Custom passwords

From Zen Cart(tm) Wiki
Jump to: navigation, search

Overview

When a customer forgets his or her password, Zen Cart™ will generate a new one. By default, this password is a mix of digits and characters such as Mx53e9. You can restrict this to all digits or all characters, however.


How to do it

Open the file includes/modules/pages/password_forgotten/header_php.php and find the following line (line 35 in an unmodified copy):

      $new_password = zen_create_random_value(ENTRY_PASSWORD_MIN_LENGTH);


Change this to either:

      $new_password = zen_create_random_value(ENTRY_PASSWORD_MIN_LENGTH,'chars');

or

      $new_password = zen_create_random_value(ENTRY_PASSWORD_MIN_LENGTH, 'digits');


Warning.png Not overridable
This file is not yet part of the override system. Be sure to clearly document your changes within the file to help you when upgrading later.