Authored by Rock Zhang

修复找回密码中的一些bug

... ... @@ -92,9 +92,12 @@ class BackController extends AbstractAction
public function successAction()
{
$this->setTitle('找回密码-通过邮箱');
$email = $this->get('email', '');
// 判断是否允许访问, 不允许则跳转到错误页面
if (!Helpers::verifyEmail($email)) {
$this->error();
}
// 获取到邮箱域名
list($name, $domain) = explode('@', $email);
$domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain);
... ... @@ -108,6 +111,7 @@ class BackController extends AbstractAction
'resendUrl' => '/passport/back/resendemail?email='.$email
);
$this->setTitle('找回密码-通过邮箱');
$this->_view->display('email-success', $data);
}
... ... @@ -147,11 +151,11 @@ class BackController extends AbstractAction
'isPassportPage' => true,
'backMobile' => true,
'countrys' => RegData::getAreasData(),
'countryCode' => '+86'
'areaCode' => '+86'
);
// 生成HTML (phoneback.html)
$this->_view->html('phoneback');
// $this->_view->html('phoneback');
$this->_view->display('mobile', $data);
}
... ... @@ -178,10 +182,14 @@ class BackController extends AbstractAction
}
// 发送手机验证码
$return = BackData::sendCodeToMobile($phoneNum, $areaCode);
if($return && $return['code'] === 200)
$result = BackData::sendCodeToMobile($phoneNum, $areaCode);
if(empty($result))
{
break;
}
if($result['code'] === 200)
{
$result = $return;
$result['data'] = '/passport/back/mobilecode?phoneNum='.$phoneNum.'&areaCode='.$areaCode;
}
... ... @@ -201,7 +209,7 @@ class BackController extends AbstractAction
$areaCode = '+'.$areaCode;
$data = array(
'backUrl' => '/mobileback.html',
'backUrl' => '/phoneback.html',
'headerText' => '找回密码',
'isPassportPage' => true,
'backCode' => true,
... ...