Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

180
 
181
 
181
 
account.php
_> 6363       return false;
  6464     }
  6565 
<>  66+    function savePassword($password) {
   67+      global $osC_Database, $osC_Customer;
   68+
   69+      $Qcustomer = $osC_Database->query('update :table_customers set customers_password = :customers_password where customers_id = :customers_id');
   70+      $Qcustomer->bindTable(':table_customers', TABLE_CUSTOMERS);
   71+      $Qcustomer->bindValue(':customers_password', tep_encrypt_password($password));
   72+      $Qcustomer->bindInt(':customers_id', $osC_Customer->id);
   73+      $Qcustomer->execute();
   74+
   75+      if ($Qcustomer->affectedRows() === 1) {
   76+        $Qupdate = $osC_Database->query('update :table_customers_info set customers_info_date_account_last_modified = now() where customers_info_id = :customers_info_id');
   77+        $Qupdate->bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
   78+        $Qupdate->bindInt(':customers_info_id', $osC_Customer->id);
   79+        $Qupdate->execute();
   80+
   81+        return true;
   82+      }
   83+
   84+      return false;
   85+    }
   86+
6687     function checkEntry($email_address) {
  6788       global $osC_Database;
  6889 
     
 !
7899       return false;
  79100     }
  80101 
<> 81 -    function checkPassword($email_address, $password) {
  82 -      global $osC_Database;
   102+    function checkPassword($password, $email_address = null) {
   103+      global $osC_Database, $osC_Customer;
83104 
<> 84 -      $Qcheck = $osC_Database->query('select customers_password from :table_customers where customers_email_address = :customers_email_address limit 1');
  85 -      $Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
  86 -      $Qcheck->bindValue(':customers_email_address', $email_address);
  87 -      $Qcheck->execute();
   105+      if ($email_address === null) {
   106+        $Qcheck = $osC_Database->query('select customers_password from :table_customers where customers_id = :customers_id');
   107+        $Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
   108+        $Qcheck->bindInt(':customers_id', $osC_Customer->id);
   109+        $Qcheck->execute();
   110+      } else {
   111+        $Qcheck = $osC_Database->query('select customers_password from :table_customers where customers_email_address = :customers_email_address limit 1');
   112+        $Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
   113+        $Qcheck->bindValue(':customers_email_address', $email_address);
   114+        $Qcheck->execute();
   115+      }
<_ 88116 
  89117       if ($Qcheck->numberOfRows() === 1) {
  90118         if ( (strlen($password) > 0) && (strlen($Qcheck->value('customers_password')) > 0) ) {