Need some guidance cookies |
I have a question about setting token for cookies.
When the user checks the remember me it will insert the user id and identifier and token to my auto login table But the token should that be stored in a session? I can set the cookie data fine but now it just trying to make the checks work so when user has clicked remember me it will auto log them in. I am just new to creating a remember me with id and tokens. http://pastebin.com/JmRk6d3M PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
07-22-2016, 04:20 AM
(This post was last modified: 07-22-2016, 04:24 AM by InsiteFX. Edit Reason: Added example php code )
If the remember me token passes and you get the users login data just set the session logged_in = true
You have logged the user in so that should be all you need to do. In your Auth Library: PHP Code: /** What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-22-2016, 04:20 AM)InsiteFX Wrote: If the remember me token passes and you get the users login data just set the session logged_in = true Thanks will have a go over week end.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |