Reset User data loaded by auth component

I have an auth component that works very hard until I have embedded a page for the user to change user information. I experienced some unknown results until I found out that after the user information is changed by this action, the user data loaded by the auth component in the session will still remain unchanged. I wanted to know if there is a way to force the auth component to reload user data from the database again? I reviewed the issue of re-registering a user, but it complicates the logs and places some bad traces in the program. is there a nicer way to do this?

+4
source share
1 answer

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

you must update it, the cake does not do everything for you;)

+13
source

Source: https://habr.com/ru/post/1341697/


All Articles