Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

206
 
207
 
207
 
account.php
_> 11 <?php
  22 /*
<> 3 -  $Id: account.php 206 2005-09-25 22:28:21Z hpdl $
   3+  $Id: account.php 207 2005-09-25 23:29:31Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
130130       return false;
  131131     }
  132132 
<> 133 -    function savePassword($password) {
   133+    function savePassword($password, $customer_id = null) {
134134       global $osC_Database, $osC_Customer;
  135135 
<>  136+      if (is_numeric($customer_id) === false) {
   137+        $customer_id = $osC_Customer->getID();
   138+      }
   139+
136140       $Qcustomer = $osC_Database->query('update :table_customers set customers_password = :customers_password where customers_id = :customers_id');
  137141       $Qcustomer->bindTable(':table_customers', TABLE_CUSTOMERS);
  138142       $Qcustomer->bindValue(':customers_password', tep_encrypt_password($password));
<> 139 -      $Qcustomer->bindInt(':customers_id', $osC_Customer->getID());
   143+      $Qcustomer->bindInt(':customers_id', $customer_id);
140144       $Qcustomer->execute();
  141145 
  142146       if ($Qcustomer->affectedRows() === 1) {
  143147         $Qupdate = $osC_Database->query('update :table_customers_info set customers_info_date_account_last_modified = now() where customers_info_id = :customers_info_id');
  144148         $Qupdate->bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
<> 145 -        $Qupdate->bindInt(':customers_info_id', $osC_Customer->getID());
   149+        $Qupdate->bindInt(':customers_info_id', $customer_id);
<_ 146150         $Qupdate->execute();
  147151 
  148152         return true;