- Timestamp:
- 2011/02/03 18:26:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php
r19995 r20074 31 31 */ 32 32 class SC_Helper_Customer { 33 34 33 34 35 35 /** 36 36 * 会員編集登録処理を行う. … … 39 39 * @param array $arrRegistColumn 登録するカラムの配列 40 40 * @return void 41 * @deprecated 41 * @deprecated 42 42 * @todo sfEditCustomerData に統一。LC_Page_Admin_Customer_Edit から呼び出されているだけ 43 43 */ … … 73 73 $arrRegist["reminder_answer"] = SC_Utils_Ex::sfGetHashString($array["reminder_answer"], $salt); 74 74 } 75 75 76 76 $arrRegist["update_date"] = "NOW()"; 77 77 78 78 //-- 編集登録実行 79 79 $objQuery->update("dtb_customer", $arrRegist, "customer_id = ? ", array($array['customer_id'])); 80 80 } 81 81 82 82 /** 83 83 * 会員編集登録処理を行う. … … 92 92 93 93 $array["update_date"] = "now()"; // 更新日 94 94 95 95 // salt値の生成(insert時)または取得(update時)。 96 96 if(is_numeric($customer_id)) { … … 121 121 } else { 122 122 // 新規登録 123 123 124 124 // 会員ID 125 125 $customer_id = $objQuery->nextVal('dtb_customer_customer_id'); … … 129 129 // 作成日 130 130 if (is_null($array["create_date"])){ 131 $array["create_date"] = "now()"; 132 } 131 $array["create_date"] = "now()"; 132 } 133 133 $objQuery->insert("dtb_customer", $array); 134 134 } 135 135 return $customer_id; 136 136 } 137 137 138 138 /** 139 139 * 注文番号、利用ポイント、加算ポイントから最終ポイントを取得する. … … 163 163 return array($point, $total_point); 164 164 } 165 165 166 166 /** 167 167 * emailアドレスから、登録済み会員や退会済み会員をチェックする 168 * 168 * 169 169 * @param string $email メールアドレス 170 170 * @return integer 0:登録可能 1:登録済み 2:再登録制限期間内削除ユーザー 3:自分のアドレス … … 172 172 function sfCheckRegisterUserFromEmail($email){ 173 173 $return = 0; 174 174 175 175 $objCustomer = new SC_Customer(); 176 176 $objQuery =& SC_Query::getSingletonInstance(); 177 177 178 178 $arrRet = $objQuery->select("email, update_date, del_flg" 179 179 ,"dtb_customer" … … 200 200 } 201 201 } 202 202 203 203 // ログインしている場合、すでに登録している自分のemailの場合はエラーを返さない 204 204 if ($objCustomer->getValue('customer_id')){ … … 208 208 ,array($objCustomer->getValue('customer_id')) 209 209 ); 210 if ($email == $arrRet[0]["email"] 210 if ($email == $arrRet[0]["email"] 211 211 || $email == $arrRet[0]["email_mobile"]){ 212 212 $return = 3; … … 215 215 return $return; 216 216 } 217 218 219 /** 220 * sfGetUniqSecretKey 221 * 222 * 重複しない会員登録キーを発行する。 223 * 224 * @access public 225 * @return void 226 */ 227 function sfGetUniqSecretKey() { 228 $objQuery = new SC_Query(); 229 $count = 1; 230 while ($count != 0) { 231 $uniqid = SC_Utils_Ex::sfGetUniqRandomId("r"); 232 $count = $objQuery->count("dtb_customer", "secret_key = ?", array($uniqid)); 233 } 234 return $uniqid; 235 } 217 236 }
Note: See TracChangeset
for help on using the changeset viewer.