phpcakephpcakephp-2.0

cakephp 2.0 how to update auth data?


when I update data in the User model, the Auth data is not updated.

How can I "refresh" the data which is returned by $this->Auth->user() when I am updating user model ?

and I don't want to use

$this->Auth->login($data);

after updating my user table


Solution

  • I tried the following line. Its works well form me After modify the user data i written the following line

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