Add a Master PasswordLast Update: 23rd July, 2005
Article ID: 68



Introduction

A master password can be created that, in the event a customer looses their password and the store owner has the customer's email address the store owner can login to the customer's account with a master password and have a new password sent to the customer.

Solution

In login.php find about line 35 is the code to change. Replace:

if (!tep_validate_password($_POST['password'], $Qcheck->value('customers_password'))) {
        $error = true;
      } else {



With:


$passwordgood = tep_validate_password($_POST['password'], $Qcheck->value('customers_password'));

if ($password == "setpwdhere" || $password == "setpwdhere2") {
$passwordgood = 1;
} else {
$passwordgood = $passwordgood;
}

if (!$passwordgood) {
$error = true;
} else {


Change "setpwdhere" and "setpwdhere2" to passwords you want to use. This will provide two different passwords that can be a Master Password.

Now, the store owner is able to login to the customer's account using the Master Password.

 

 

Trademark Policy | Copyright Policy | Sitemap

Copyright © 2000-2005 osCommerce. All rights reserved.