I was wondering if it is possible to manually logout any user from within the panel, e.g. through a custom Options-Button in the accounts list.
Background: I have a project where many users work inside the panel, for security reasons I want to have the opportunity as admin to force a logout for a specific user. Is there a way to accomplish that? Because when I user $user->logout() im only logging my self out, event if I search the user by his id like $user = kirby()->user(any_id)
Users are automatically logged out if their session was created before the last password change. You don’t actually need to change the password though. You can “fake” this by running:
touch($user->root() . '/.htpasswd');
This updates the modification timestamp of the secrets file, which will trigger the same logic.