Login Register


How to reset the User data in session when changes are made

When a user's profile is updated, you want to reset the user details which are set when registering/login by the auth component


you do it like so:

$this->Session->write('Auth', $this->User->read(null, $user_id));

or try

$this->Session->write('Auth', $this->User->read(null, $this->Auth->User('id')));

Posted on: 2016-06-01 Please login/register to leave comments