1

I changed password for admin user in magento backend but on others browser user is logged in backend. How I can clear admin user session programmatically

1

This is quite similar to a post I had created, How to Delete Customer Session From Admin

There is not a straight forward solution to this kind of problem, there is no way from the admin session to identify which session(s) exist for a logged in user. This applies to the front end, which is where I was trying to effect changes.

Your only approach would be to programatically open all the sessions, and identify from the session data its self which one(s) belong to the admin user you want to impact, then you can wipe out that session. Thus when they return the session will have expired thus forcing them to log in.

Alternatively, perhaps you can use something similar to my approach - observe the request, and detect that the password has been changed recently - the session should have a last modified type of information which if you check against the user row in the database , if the password save is newer you can log them out.

  • Where I can find session admin user ? – omelandr Jul 8 '15 at 9:04
  • Sessions exist regardless of wether the user is admin or not, so you would need to process each and identify from the session that they are active in the adminhtml view rather than front view. I suggest enabling file system sesisons, clear them all and log into admin so you can see what the resulting session is. – John Cuthbert Jul 8 '15 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.