修复无法正确绑定的问题
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
41fb2eb7de
commit
99afe11510
@ -238,7 +238,12 @@ class Login extends BasicApi
|
|||||||
if (!config('mail.open')) {
|
if (!config('mail.open')) {
|
||||||
$this->error('系统尚未开启邮件服务');
|
$this->error('系统尚未开启邮件服务');
|
||||||
}
|
}
|
||||||
|
$member = getCurrentMember();
|
||||||
|
|
||||||
$email = $this->request->post('mail', '');
|
$email = $this->request->post('mail', '');
|
||||||
|
if ($email && $member['email'] == $email) {
|
||||||
|
$this->error('你已绑定该邮箱', 203);
|
||||||
|
}
|
||||||
$mailer = new Mail();
|
$mailer = new Mail();
|
||||||
try {
|
try {
|
||||||
$mail = $mailer->mail;
|
$mail = $mailer->mail;
|
||||||
@ -247,10 +252,9 @@ class Login extends BasicApi
|
|||||||
//Content
|
//Content
|
||||||
$mail->isHTML(true);
|
$mail->isHTML(true);
|
||||||
$mail->Subject = '申请修改邮箱地址';
|
$mail->Subject = '申请修改邮箱地址';
|
||||||
$member = getCurrentMember();
|
|
||||||
$info = [
|
$info = [
|
||||||
'member_code' => $member['code'],
|
'member_code' => $member['code'],
|
||||||
'email' => $member['email'],
|
'email' => $email,
|
||||||
];
|
];
|
||||||
$accessToken = JwtService::getAccessToken($info);
|
$accessToken = JwtService::getAccessToken($info);
|
||||||
$link = Request::domain() . '/#/reset/email?token=' . $accessToken;
|
$link = Request::domain() . '/#/reset/email?token=' . $accessToken;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user