cakephp 2.0如何更新auth数据?
问题描述:
当我更新User模型中的数据时,Auth数据不更新。
when I update data in the User model, the Auth data is not updated.
如何刷新$ this-> Auth-> user()当我更新用户模型?
How can I "refresh" the data which is returned by $this->Auth->user() when I am updating user model ?
,我不想使用
$ this-> Auth-> login($ data);
$this->Auth->login($data);
/ p>
after updating my user table
答
我试过下面这行。它的工作很好地形成我
修改用户数据后我写了以下行
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')));