You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user is suspended using AdminModel::setAccountSuspensionAndDeletionStatus() that internally calls AdminModel::resetUserSession() method, the feedback message says "The selected user has been successfully kicked out of the system (by resetting this user's session)",
That's not really true. In facts, the suspended user is still able to access protected pages until its session expires or he logouts. (Then, he is not able to login anymore as expected)
There is no way to kick out the user instantanitly (strictly speaking). On the other hand, it's possible, with a minor change, to not wait its session expires.
The Session::isConcurrentSessionExists() method that checks for session concurrency could be changed to Session::isSessionBroken() and check two things (with only one database call) :
session concurrency exists
or sessionId does not exist anymore in database
This way, the suspended user is kicked out as soon he tries to access another page.
When a user is suspended using
AdminModel::setAccountSuspensionAndDeletionStatus()
that internally callsAdminModel::resetUserSession()
method, the feedback message says "The selected user has been successfully kicked out of the system (by resetting this user's session)",That's not really true. In facts, the suspended user is still able to access protected pages until its session expires or he logouts. (Then, he is not able to login anymore as expected)
There is no way to kick out the user instantanitly (strictly speaking). On the other hand, it's possible, with a minor change, to not wait its session expires.
The
Session::isConcurrentSessionExists()
method that checks for session concurrency could be changed toSession::isSessionBroken()
and check two things (with only one database call) :This way, the suspended user is kicked out as soon he tries to access another page.
Actual method in
Session
class:Proposed:
and don't forget to change function in
Auth
classI made that change in another project, and could make a PR.
Regards
The text was updated successfully, but these errors were encountered: