I have a CakePHP app where users have pages tied to their accounts. For example, the page ID 123 is tied to user 321.
Whenever the user logs in, all the pages tied to his account are saved in the session.
Admins are the only one who can tie a page to an user. And here is the problem. If an admin adds a new page to an user and if this user is logged, he won’t see this new page tied to his account unless he logs out/in. In other words, while his current session is valid.
What would be the best way to deal with this? If there is any way…
- Find the user session and… update? delete? Is this even possible and/or “elegant”?
- Send a message to this user warning about the new page and tell him to logout/login?
- Stop saving this info in the session and rely on database only?
You really should stop saving this info in session.