I want to validate the admin current password programmatically. I enter a current password in textbox. Script should check this is valid current password or not.

I used below code

$user = Mage::getModel('adminhtml/user');

$result = $user->_validateCurrentPassword($user_id,$currentpwd);

Guys, can anybody help me please asap


1 Answer 1


After did research and with my buddy's help, I got the solution

$user = Mage::getModel('admin/user')->load($user_id);// user your admin userid
$this->validateHash($currentpwd, $user->getPassword());

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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