In order to update current user logged in Auth Session after a database change in his information in Users Table use the following command
$userid=$this->Auth->user('id');
$this->Session->write('Auth',$this->User->read(null,$userid));
That's it and your auth session is updated..
This is usually done once a user updates his information....
$userid=$this->Auth->user('id');
$this->Session->write('Auth',$this->User->read(null,$userid));
That's it and your auth session is updated..
This is usually done once a user updates his information....
No comments:
Post a Comment