From 12d60126622e5a470aa644ae0d08e415cbcb818e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 23 Dec 2020 14:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=BF=80=E6=B4=BB?= =?UTF-8?q?=E7=AB=AF=E4=B8=8E=E7=94=B3=E8=AF=B7=E9=AA=8C=E8=AF=81=E7=AB=AF?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E5=AF=BC=E8=87=B4=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=8A=B6=E6=80=81=E5=BC=82=E5=B8=B8=E7=9A=84?= =?UTF-8?q?Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/include/spacecp/spacecp_profile.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/upload/source/include/spacecp/spacecp_profile.php b/upload/source/include/spacecp/spacecp_profile.php index f82afa972..b9b111489 100644 --- a/upload/source/include/spacecp/spacecp_profile.php +++ b/upload/source/include/spacecp/spacecp_profile.php @@ -425,7 +425,14 @@ if($operation == 'password') { $space['newemail'] = !$space['emailstatus'] ? $space['email'] : ''; if(!empty($newemail)) { $mailinfo = explode("\t", $newemail); - $space['newemail'] = $mailinfo[0] == $_G['uid'] && isemail($mailinfo[1]) ? $mailinfo[1] : ''; + if(is_array($mailinfo) && $mailinfo[0] == $_G['uid'] && isemail($mailinfo[1])) { + if($space['emailstatus'] && !$space['freeze'] && strcasecmp($mailinfo[1], $space['email']) === 0) { + dsetcookie('newemail', '', -1); + $space['newemail'] = ''; + } else { + $space['newemail'] = $mailinfo[1]; + } + } } if($_GET['resend'] && $resend) { -- Gitee