Store id from user in session |
[eluser]sb05[/eluser]
Hope someone can me help me with this one, been at it for a couple of days now. I want to store the id (from the user that is logging in) in to the session. I already added a row named 'id' in my ci_sessions table in the database. I tried the following in the Session.php: Code: $this->userdata = array( Didn't have any effect i guess because in the database it saves as 0 everytime. Thanks in advance
[eluser]InsiteFX[/eluser]
Code: // all of this is handled by the Session Libray I think you need to read the CodeIgniter USer Guide on Sessions. CodeIgniter User Guide - Session Class InsiteFX
[eluser]sb05[/eluser]
This was originally in the Session.php. Code: function sess_create() Only thing i added where the lines: Code: if (isset($this->userdata['id'])) { But it don't save the id of the user that is logging in. I'm using the dx_auth library if that matters. Tnx |
Welcome Guest, Not a member yet? Register Sign In |