when I make a request for a link to reset an admin password, the URL is sent to the email without params, like this:


So, without params, obviously the users can't reset their passwords.

The function sending the email is this:

public function forgotpasswordAction()
    $email = (string) $this->getRequest()->getParam('email');
    $params = $this->getRequest()->getParams();

    if (!empty($email) && !empty($params)) {
        // Validate received data to be an email address
        if (Zend_Validate::is($email, 'EmailAddress')) {
            $collection = Mage::getResourceModel('admin/user_collection');
            /** @var $collection Mage_Admin_Model_Resource_User_Collection */
            $collection->addFieldToFilter('email', $email);

            if ($collection->getSize() > 0) {
                foreach ($collection as $item) {
                    $user = Mage::getModel('admin/user')->load($item->getId());
                    if ($user->getId()) {
                        $newResetPasswordLinkToken = Mage::helper('admin')->generateResetPasswordLinkToken();
                ->addSuccess(Mage::helper('adminhtml')->__('If there is an account associated with %s you will receive an email with a link to reset your password.', Mage::helper('adminhtml')->escapeHtml($email)));
        } else {
            $this->_getSession()->addError($this->__('Invalid email address.'));
    } elseif (!empty($params)) {
        $this->_getSession()->addError(Mage::helper('adminhtml')->__('The email address is empty.'));

Is the same of the core on:


This only happens with de administrator users, the customers from the stores are working fine.

The Magento version is:

The url code on the email template is:

{{store url="customer/account/resetpassword/" _query_id=$customer.id _query_token=$customer.rp_token}}

Any ideas?

Thanks a lot.

  • 1
    Hmmm "customer.id" for the backend? That does not sound right. Which template are you looking at? Sep 14, 2016 at 6:18
  • Not sure what you're doing but /customer/account/resetpassword is only for CUSTOMERS (frontend). Admins can change their password in the admin panel. Sep 14, 2016 at 10:42
  • I have experienced the same issue in Did you happen to find a solution? Apr 19, 2017 at 17:11


Your Answer

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