I've been building an enhanced password policy module for Magento 1.9, the specifics of which aren't causing a problem.

At the moment it hooks into admin_user_validate, fired from Mage_Admin_Model_User:563 event and validates the $observer->getUser()->getData('new_password'), which works fine when validating password changes for existing users, however I can't seem to get it to work for validating a new user's password.

I can see from Mage_Admin_Model_User that the event is only fired within the if ($this->hasNewPassword()) conditional, which wouldn't be triggered by a new user, so I guess my question is, does anyone know if there is another event that is triggered by both new and existing users, or is there a better way to validate password changes, preferably via an observer.

Any help is appreciated.

1 Answer 1


Try following event


And method is

 * Validate password before admin account save action
 * @param Varien_Event_Observer $observer
public function validatePasswordAdminAccountSaveAction(Varien_Event_Observer $observer)
    $controllerAction = $observer->getEvent()->getControllerAction();
    $password = $controllerAction->getRequest()->getPost('new_password');

    if (!empty($password)) {
        if(!$this->validateAdminPassword($password)) {
  • Ahh yes, the generic pre-dispatch event, how could I forget :) I'm going to mark this as correct as the logic works, but for anyone reading this in the future, the event I hooked into was controller_action_predispatch_adminhtml_permissions_user_save. Cheers Sohel.
    Apr 27, 2018 at 8:33

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.