Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset User data loaded by auth component

I have auth component working greatly till I implemented a page for the user to change the user's info. I experienced some unknown results till I found out that after user's info being changed by that action, the user data loaded by auth component in session still remains the same. I wanted to know if there is any way to force auth component reload the user data from database again? I considered re-logging in the user but it makes the logs complicated and places some bad traces in program. is there any more beautiful way to do so?

like image 916
mohamnag Avatar asked Dec 12 '22 15:12

mohamnag


1 Answers

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

you got to update it, cake does not do everything for you ;)

like image 165
dogmatic69 Avatar answered Jan 06 '23 15:01

dogmatic69