cakephp 2.0如何更新auth数据? [英] cakephp 2.0 how to update auth data?
本文介绍了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')));
这篇关于cakephp 2.0如何更新auth数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文