customer's password not displayed in email templates magento 1.9.1.0

customer's password not displayed in email templates magento 1.9.1.0

July 31, 2026 · Illustrated author avatarBy Stefan Bogdanescu
customer's password not displayed in email templates magento 1.9.1.0

Solving Magento Password Display Issue in Email Templates

If you’re facing an issue where the customer’s password isn’t being displayed correctly in your email templates after registration, don’t worry—we can fix this together! I’ll guide you step-by-step through resolving this common problem in Magento 1.9.1.0.

Understanding the Issue

The main culprit behind this problem lies in how Magento handles and displays sensitive data like passwords. By default, it uses {{htmlescape var=$customer.password}} which escapes any special characters present in the password string, leading to an empty field or garbled output.

The Quick Fix: Displaying Password Correctly

To make your customer’s password display correctly in the account_new.html email template, you need to adjust how it’s being rendered. Instead of using {{htmlescape var=$customer.password}}, we’ll use a raw variable:

  1. Open your active theme directory for the ‘email’ folder (e.g., app/design/frontend/default/yourtheme/template/email/).

  2. Locate and open the account_new.html template file in a text editor.

  3. Find this line:

    <strong>Password</strong>: {{htmlescape var=$customer.password}}<p>
    
  4. Replace {{htmlescape var=$customer.password}} with simply {{var customer.password}}. Your updated code should look like this:

<strong>Password</strong>: {{var customer.password}}<p>
  1. Save the file and exit your editor.

Verify the Changes

Now, let’s test if the issue is resolved:

  1. Log out of your Magento admin panel (if you’re logged in).

  2. Navigate to your frontend store URL to trigger a new registration.

  3. Enter the necessary details and submit the form for account creation.

  4. Check your email client to see if the password displays correctly without any special character escaping or empty fields.

Why This Works

By using {{var customer.password}}, you’re instructing Magento to display the raw, unescaped value of the password variable from the $customer object. This allows the actual password string to be rendered as intended in your email template.

Conclusion

In this post, we’ve explored a common challenge with displaying passwords in Magento email templates and provided a straightforward solution. By adjusting the code in the account_new.html file, you can ensure that new customers receive their registration details accurately, including the correct password display without any special character escaping or empty fields.

Remember to always test your changes thoroughly to confirm they resolve the issue and don’t introduce any new problems. If you’re still facing difficulties, feel free to reach out for further assistance.

For more in-depth tutorials on Magento customization and development, I recommend checking out the comprehensive guides available at Laravel Company. They offer a wealth of knowledge from experienced developers who can help you master your Magento projects.

Magento 1 Themes Email Customers

Our network