I’m new to CakePHP and frameworks and I’ve tried to google in search of an answer without any luck.
I’m using the blank login() function and want to be able to change user records on login (like last_login). How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re using Cake’s Auth component, first you’ll have to insert the following line into your beforeFilter function:
Setting this to false will allow the following code to execute after CakePHP’s login function has done its magic.
In your login function add:
Note: Make sure you’ve got the last_login field in your users table and its set to datetime.