Changeset 20159 for branches/version-2_5-dev/data/class
- Timestamp:
- 2011/02/12 19:44:52 (15 years ago)
- Location:
- branches/version-2_5-dev/data/class/pages
- Files:
-
- 1 deleted
- 2 edited
-
frontparts/LC_Page_FrontParts_LoginCheck.php (modified) (6 diffs)
-
mypage/LC_Page_AbstractMypage.php (modified) (2 diffs)
-
mypage/LC_Page_Mypage_LoginCheck.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/frontparts/LC_Page_FrontParts_LoginCheck.php
r20116 r20159 70 70 SC_Utils_Ex::sfDispSiteError(PAGE_ERROR); 71 71 } 72 72 73 73 // 会員管理クラス 74 74 $objCustomer = new SC_Customer(); … … 77 77 // パラメータ管理クラス 78 78 $this->objFormParam = new SC_FormParam(); 79 79 80 80 // パラメータ情報の初期化 81 81 $this->lfInitParam($this->objFormParam); 82 82 83 83 // リクエスト値をフォームにセット 84 84 $this->objFormParam->setParam($this->lfConvertParam($_POST)); 85 85 86 86 // モードによって分岐 87 87 switch ($this->getMode()) { 88 88 case 'login': 89 89 // --- ログイン 90 90 91 91 // 入力値のエラーチェック 92 92 $this->objFormParam->toLower('login_email'); 93 93 $arrErr = $this->objFormParam->checkError(); 94 94 95 95 // エラーの場合はエラー画面に遷移 96 96 if (count($arrErr) > 0) { 97 97 SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR); 98 98 } 99 99 100 100 // 入力チェック後の値を取得 101 101 $arrForm = $this->objFormParam->getHashArray(); 102 102 103 103 // クッキー保存判定 104 104 if ($arrForm['login_memory'] == '1' && $arrForm['login_email'] != '') { … … 107 107 $objCookie->setCookie('login_email', ''); 108 108 } 109 109 110 110 // 遷移先の制御 111 111 if (count($arrErr) == 0) { 112 // ログイン判定 113 $loginFailFlag = false; 114 if(SC_Display::detectDevice() === DEVICE_TYPE_MOBILE) { 115 // モバイルサイト 116 if(!$objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) && 117 !$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) { 118 $loginFailFlag = true; 119 } 120 } else { 121 // モバイルサイト以外 122 if(!$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'])) { 123 $loginFailFlag = true; 124 } 125 } 126 112 127 // ログイン処理 113 if ($objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) { 128 if ($loginFailFlag == false) { 129 if(SC_Display::detectDevice() === DEVICE_TYPE_MOBILE) { 130 // ログインが成功した場合は携帯端末IDを保存する。 131 $objCustomer->updateMobilePhoneId(); 132 133 /* 134 * email がモバイルドメインでは無く, 135 * 携帯メールアドレスが登録されていない場合 136 */ 137 $objMobile = new SC_Helper_Mobile_Ex(); 138 if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) { 139 if (!$objCustomer->hasValue('email_mobile')) { 140 SC_Response_Ex::sendRedirectFromUrlPath('entry/email_mobile.php'); 141 exit; 142 } 143 } 144 } 145 114 146 // --- ログインに成功した場合 115 SC_Response_Ex::sendRedirect( HTTP_URL);147 SC_Response_Ex::sendRedirect($_POST['url']); 116 148 exit; 117 149 } else { … … 134 166 exit; 135 167 } 136 168 137 169 break; 138 170 case 'logout': 139 171 // --- ログアウト 140 172 141 173 // ログイン情報の解放 142 174 $objCustomer->EndSession(); … … 151 183 } 152 184 exit; 153 185 154 186 break; 155 187 default: 156 188 break; 157 189 } 158 190 159 191 } 160 192 … … 176 208 function lfInitParam(&$objFormParam) { 177 209 $objFormParam->addParam('記憶する', 'login_memory', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 178 $objFormParam->addParam('メールアドレス', 'login_email', MTEXT_LEN, 'a', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', ' EMAIL_CHECK', 'NO_SPTAB' ,'EMAIL_CHAR_CHECK'));210 $objFormParam->addParam('メールアドレス', 'login_email', MTEXT_LEN, 'a', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NO_SPTAB' ,'EMAIL_CHAR_CHECK')); 179 211 $objFormParam->addParam('パスワード', 'login_pass', PASSWORD_LEN1, '', array('EXIST_CHECK')); 180 212 $objFormParam->addParam('パスワード', 'login_pass1', PASSWORD_LEN1, '', array('EXIST_CHECK', 'MIN_LENGTH_CHECK')); -
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_AbstractMypage.php
r20156 r20159 71 71 72 72 // POSTされてきたIDがある場合は優先する。 73 if(isset($_POST[' mypage_login_email'])74 && $_POST[' mypage_login_email'] != "") {75 $this->tpl_login_email = $_POST[' mypage_login_email'];73 if(isset($_POST['login_email']) 74 && $_POST['login_email'] != "") { 75 $this->tpl_login_email = $_POST['login_email']; 76 76 } 77 77 … … 80 80 $this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId(); 81 81 } 82 $this->tpl_title = 'MYページ(ログイン)'; 83 $this->tpl_mainpage = 'mypage/login.tpl'; 82 $this->tpl_title = 'MYページ(ログイン)'; 83 $this->tpl_mainpage = 'mypage/login.tpl'; 84 $this->transactionid = SC_Helper_Session_Ex::getToken(); 84 85 85 86 } else {
Note: See TracChangeset
for help on using the changeset viewer.
