Ignore:
Timestamp:
2011/01/20 03:03:24 (15 years ago)
Author:
AMUAMU
Message:

#335 (パスワードリマインダの改修) の解決

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php

    r19986 r19995  
    9393        $array["update_date"] = "now()";    // 更新日 
    9494         
    95         //-- パスワードの更新がある場合は暗号化 
    96         $salt = ""; 
    97         if ($array["password"] != DEFAULT_PASSWORD) { 
     95        // salt値の生成(insert時)または取得(update時)。 
     96        if(is_numeric($customer_id)) { 
     97            $salt = $objQuery->get("salt", "dtb_customer", "customer_id = ? ", array($customer_id)); 
     98        }else{ 
    9899            $salt = SC_Utils_Ex::sfGetRandomString(10); 
    99100            $array["salt"] = $salt; 
     101        } 
     102        //-- パスワードの更新がある場合は暗号化 
     103        if ($array["password"] == DEFAULT_PASSWORD or $array["password"] == "") { 
     104            //更新しない 
     105            unset($array["password"]); 
     106        } else { 
    100107            $array["password"] = SC_Utils_Ex::sfGetHashString($array["password"], $salt); 
    101         } else { 
    102             unset($array["password"]); 
    103         } 
    104         if ($array["reminder_answer"] != DEFAULT_PASSWORD) { 
    105             if(is_numeric($customer_id) and $salt == "") { 
    106                 $salt = $objQuery->get("salt", "dtb_customer", "customer_id = ? ", array($array['customer_id'])); 
    107             } 
     108        } 
     109        //-- 秘密の質問の更新がある場合は暗号化 
     110        if ($array["reminder_answer"] == DEFAULT_PASSWORD or $array["reminder_answer"] == "") { 
     111            //更新しない 
     112            unset($array["reminder_answer"]); 
     113        } else { 
    108114            $array["reminder_answer"] = SC_Utils_Ex::sfGetHashString($array["reminder_answer"], $salt); 
    109115        } 
    110         
     116 
    111117        //-- 編集登録実行 
    112118        if (is_numeric($customer_id)){ 
     
    164170     *   @return integer  0:登録可能     1:登録済み   2:再登録制限期間内削除ユーザー  3:自分のアドレス 
    165171     */ 
    166     function lfCheckRegisterUserFromEmail($email){ 
     172    function sfCheckRegisterUserFromEmail($email){ 
    167173        $return = 0; 
    168174         
Note: See TracChangeset for help on using the changeset viewer.