CodeIgniter Forums
Access variable from Filter function in Controller function - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Access variable from Filter function in Controller function (/showthread.php?tid=81190)



Access variable from Filter function in Controller function - next2heaven - 02-02-2022

I've have a filter set up and inside the 'before' function I decode a JWT that's sent over. I'm wondering how I can take the user's id (contained in the JWT) and use that in a controller function after the filter is complete. Is that possible?