CodeIgniter Forums
Access Session Data in Security Class - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Access Session Data in Security Class (/showthread.php?tid=46415)



Access Session Data in Security Class - El Forum - 10-31-2011

[eluser]Unknown[/eluser]
Hi,

I've been looking through the forums but have had no luck in finding an answer to my problem. I am looking into enabling the CSRF tokens for forms. Instead of using the current way of generating the tokens, randomly and storing them in a cookie, I am looking at using the current session ID as the token, since it will be more scalable across the current platform. My issue is that I cannot get access to the session data in an overridden security class file. I have tried instantiating the sessions helper in both the constructor and the function itself with no luck, including trying to grab "&getinstance;" of ci.

Any help is greatly appreciated.

Chris