/** * 检查用户密码 */ public function checkUsernameAction() { $username = $this->getInput('username', 'post'); if (!$username) { $this->showError('USER:findpwd.username.require', 'u/findPwd/run'); } /*用户不存在*/ if (!PwUserValidator::checkUsernameExist($username)) { $this->showError('USER:user.error.-14'); } $findPasswordBp = new PwFindPassword($username); /*[用户分支1:没有绑定任何可以找回密码的方式]*/ if (false === ($findPasswordBp->isBindMail() || $findPasswordBp->isBindMobile())) { $this->showError('USER:findpwd.notbind'); } $isOverMail = $findPasswordBp->isOverByMail(); $isOverMobile = $findPasswordBp->isOverByMobile(); /*[用户分支2:两种方式的找回密码都已经超过当日次数限制]*/ if ($isOverMail && $isOverMobile) { $this->showError('USER:findpwd.over.limit'); } /*【分支1:只开通手机】网站开通了:手机找回密码方式*/ if (false === $this->isMailOpen && $this->isMobileOpen) { if ($isOverMobile) { $this->showError('USER:findpwd.over.limit.mobile'); } if ($this->getInput('step', 'post') == 'do') { $this->forwardAction('u/findPwd/bymobile?username='******'USER:findpwd.over.limit.email'); } if ($this->getInput('step', 'post') == 'do') { $this->forwardAction('u/findPwd/bymail?username='******'USER:findpwd.way.close'); if ($this->getInput('step', 'post') == 'do') { $this->forwardAction('u/findPwd/bymail?username='******'USER:findpwd.over.limit.mobile'); } if ($this->getInput('step', 'post') == 'do') { $this->forwardAction('u/findPwd/bymobile?username='******'USER:findpwd.over.limit.email'); } if ($this->getInput('step', 'post') == 'do') { $this->forwardAction('u/findPwd/bymail?username='******'step', 'post') == 'do') { $this->setOutput($username, 'username'); $this->setTemplate('findpwd_way'); } else { $this->showMessage(''); } }