<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 教師賬號強制綁定手機或郵箱 # 未名教師賬號登錄時檢測是否綁定手機/郵箱、是否為初始密碼123456,流程如下: ![](./img/Login.jpg) *D:\wamp\www\ketang.test\weike\protected\controllers\LoginController.php* actionIndex() *D:\wamp\www\ketang.test\weike\themes\custom3\views\version2\login\themeType3\indexTeacher_cus.php* ``` checkIsBindEmailPhone(); // 檢測用戶是否已經綁定了郵箱或手機,默認密碼是否是123456 by wangbo 2019-2-28 function checkIsBindEmailPhone() { var url = "<?php echo $this->createUrl('ktUser/checkUserDefaultPassword');?>"; $.get(url, function(data){ // noBindEmailOrPhone : 檢測用戶是否已經綁定了郵箱或手機 if (data == "noBindEmailOrPhone") { } // UnsafePass : 判斷是否為初始密碼123456 if (data == "UnsafePass") { } }); } ``` ## 方法 是否已綁定手機或郵箱 是否為初始密碼123456 ## 修改新密碼流程 判斷是否是第一次修改默認密碼 ↓ 獲取驗證碼(找到密碼) http://ketang311.wm3dao.com/index.php?r=User/resetUserPwd ## 綁定手機或郵箱 ### 01 綁定郵箱頁面 http://ketang311.wm3dao.com/index.php?r=ktUser/bindEmail ![](./img/L/01.png) ### 02 發送郵件驗證 http://ketang311.wm3dao.com/index.php?r=ktUser/sendEmailBind ``` POST email: 3330819360@qq.com isResend: false ``` ![](./img/L/02.png) ### 03 郵件內容 ![](./img/L/03.png) 綁定郵箱鏈接: http://ketang311.wm3dao.com/index.php?r=ktUser/clickBindEmail&code=185628ee07059c738991121740e84136&email=3330819360%40qq.com&userId=474897 *D:\wamp\www\ketang.test\weike\protected\controllers\KtUserController.php* ``` $userId = RequestUtils::getNormalRequest('userId'); $email = RequestUtils::getNormalRequest('email'); $code = RequestUtils::getNormalRequest('code'); $emailDetail = Email::model()->findByAttributes(['fdUserID'=>$userId,'fdEmail'=>$email]); if ($code && $code != md5($emailDetail->fdCode) && $email != $emailDetail->fdEmail) { $this->redirect_msgBox(array('ktUser/bindEmail'),array('msg'=> '參數錯誤,請重新綁定!')); Yii::app()->end(); } ... IdentityService::factory()->isBindEmailByUserID($userId); //判斷用戶是否綁定郵箱 ... ``` ### 表 wksvc.tbEmail ``` CREATE TABLE `tbEmail` ( `id` int(11) NOT NULL AUTO_INCREMENT, `fdUserID` int(11) DEFAULT NULL COMMENT '?ˉ1?o”tbUser.id', `fdEmail` varchar(64) DEFAULT NULL COMMENT '?”μ?-?é???????°??€', `fdCode` varchar(8) DEFAULT NULL COMMENT 'éa?èˉ???????é?????éa?èˉ?é?€è|?md5????ˉ??”??????€??aé“???¥', `fdSent` datetime DEFAULT NULL COMMENT 'fdCode?”????????—?é—′', `fdVerified` datetime DEFAULT NULL COMMENT 'éa?èˉ??—?é—′???0è?¨?¤o??aéa?èˉ?', `fdDefault` tinyint(4) NOT NULL COMMENT '??o???????”μ?-?é????±??°??€\n 0-???é€?\n 1-??o???', PRIMARY KEY (`id`), KEY `FK_Reference_52` (`fdUserID`), KEY `email` (`fdEmail`) ) ENGINE=MyISAM AUTO_INCREMENT=117831 DEFAULT CHARSET=utf8 COMMENT='?”μ?-?é???????°??€è?¨?????€??a?oo??ˉ??¥??¥??‰?¤???a?”μ?-?é??'; ``` ![](./img/L/04.png) ## 綁定手機 http://ketang311.wm3dao.com/index.php?r=ktUser/bindPhone ### 1 綁定手機 ![](./img/L/05.png) ### 2 手機驗證 http://ketang311.wm3dao.com/index.php?r=user/addPhoneBind ``` POST phone: 15920914758 ``` ![](./img/L/06.png) *D:\wamp\www\ketang.test\weike\protected\controllers\UserController.php* ``` V2IdentityService::factory()->getBoundPhone($userId); //獲取用戶綁定的手機號 ... $args = array( 'uid' => $uid, 'num' => $num, 'verified' => $verified, 'outsideHost' => $outsideHost, 'code' => $code ); return Phone::model()->find($this->findPhone($args)); ... ``` ### 3 表 wksvc.tbPhone ``` CREATE TABLE `tbPhone` ( `id` int(11) NOT NULL AUTO_INCREMENT, `fdUserID` int(11) NOT NULL, `fdPhone` varchar(32) NOT NULL, `fdCode` varchar(8) DEFAULT NULL COMMENT 'éa?èˉ???????é€?è????-????????‘', `fdSent` datetime DEFAULT NULL COMMENT 'fdCode?”?????1???‘?”?????—?é—′', `fdVerified` datetime DEFAULT NULL COMMENT '??-???éa?èˉ??—?é—′???0è?¨?¤o??aéa?èˉ?', `fdDefault` tinyint(4) NOT NULL COMMENT '', PRIMARY KEY (`id`), KEY `FK_Reference_53` (`fdUserID`), KEY `phone` (`fdPhone`) ) ENGINE=MyISAM AUTO_INCREMENT=137535 DEFAULT CHARSET=utf8 COMMENT=''; ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看