Concrete CMS 9.2: How to force user log out programmatically

132 Views Asked by At

I'm developing a Concrete CMS package. I add/remove users to/from a group. The group has some page access permissions, that is if a user belongs to the group, they can visit a Dashboard/MyPackage page. If I remove a user from the group, they must not view the page.

But what actually happens - I as admin remove another user from the group and force the user to be logged out programmatically. But instead of the other user being logged out, I myself get logged out while nothing happens to the other user who can still view the page unless I'm logged in in another browser and click on the logout link - only then the removed group permissions get cleared. What's wrong with that?

$u->exitGroup($group);
$u->refreshUserGroups();
$u->logout();

What can I do to for the user logout regardless?

In fact that's not a programming issue because I still have the same problem if do the same actions in the Dashboard menu, i.e. remove the group from a user while he's logged in in another browser and he still can visit the page.

0

There are 0 best solutions below