- Timestamp:
- 2011/02/04 12:08:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php
r20074 r20085 173 173 $return = 0; 174 174 175 $objCustomer = new SC_Customer(); 176 $objQuery =& SC_Query::getSingletonInstance(); 177 178 $arrRet = $objQuery->select("email, update_date, del_flg" 179 ,"dtb_customer" 180 ,"email = ? OR email_mobile = ? ORDER BY del_flg" 181 ,array($email, $email) 182 ); 175 $objCustomer = new SC_Customer(); 176 $objQuery =& SC_Query::getSingletonInstance(); 177 178 $arrRet = $objQuery->select("email, update_date, del_flg", 179 "dtb_customer", 180 "email = ? OR email_mobile = ? ORDER BY del_flg", 181 array($email, $email)); 183 182 184 183 if(count($arrRet) > 0) { 185 184 if($arrRet[0]['del_flg'] != '1') { 186 185 // 会員である場合 187 if (!isset($objErr->arrErr['email'])) $objErr->arrErr['email'] = "";188 186 $return = 1; 189 187 } else { 190 188 // 退会した会員である場合 191 189 $leave_time = SC_Utils_Ex::sfDBDatetoTime($arrRet[0]['update_date']); 192 $now_time = time();193 $pass_time = $now_time - $leave_time;190 $now_time = time(); 191 $pass_time = $now_time - $leave_time; 194 192 // 退会から何時間-経過しているか判定する。 195 193 $limit_time = ENTRY_LIMIT_HOUR * 3600; 196 194 if($pass_time < $limit_time) { 197 if (!isset($objErr->arrErr['email'])) $objErr->arrErr['email'] = "";198 195 $return = 2; 199 196 } … … 203 200 // ログインしている場合、すでに登録している自分のemailの場合はエラーを返さない 204 201 if ($objCustomer->getValue('customer_id')){ 205 $arrRet = $objQuery->select("email, email_mobile" 206 ,"dtb_customer" 207 ,"customer_id = ? ORDER BY del_flg" 208 ,array($objCustomer->getValue('customer_id')) 209 ); 210 if ($email == $arrRet[0]["email"] 211 || $email == $arrRet[0]["email_mobile"]){ 212 $return = 3; 213 } 202 $arrRet = $objQuery->select("email, email_mobile", 203 "dtb_customer", 204 "customer_id = ? ORDER BY del_flg", 205 array($objCustomer->getValue('customer_id'))); 206 207 if ($email == $arrRet[0]["email"] || $email == $arrRet[0]["email_mobile"]) { 208 $return = 3; 209 } 214 210 } 215 211 return $return;
Note: See TracChangeset
for help on using the changeset viewer.