From 42aa5a0f288b0e4a67b581837ada192a133b5302 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 21 Jun 2022 14:05:36 +0800 Subject: [PATCH] * Finish task #57894. --- module/user/control.php | 3 +-- module/user/js/resetpassword.js | 2 +- module/user/view/forgetpassword.html.php | 8 ++++---- module/user/view/resetpassword.html.php | 12 ++++++------ 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/module/user/control.php b/module/user/control.php index f346a577e3..e70664f109 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -1107,7 +1107,7 @@ class user extends control $code = uniqid(); $this->dao->update(TABLE_USER)->set('resetToken')->eq(json_encode(array('code' => $code, 'endTime' => strtotime("+{$this->config->user->resetPasswordTimeout} minutes"))))->where('account')->eq($account)->exec(); - $result = $this->mail->send($account, $this->lang->user->resetPWD, sprintf($this->lang->mail->forgetPassword, commonModel::getSysURL() . $this->inlink('resetPassword', 'code=' . $code)), true); + $result = $this->mail->send($account, $this->lang->user->resetPWD, sprintf($this->lang->mail->forgetPassword, commonModel::getSysURL() . inlink('resetPassword', 'code=' . $code)), true); if(strstr($result, 'ERROR')) return $this->send(array('result' => 'fail', 'message' => $this->lang->user->error->sendMailFail), true); return $this->send(array('result' => 'success', 'message' => $this->lang->user->sendEmailSuccess)); @@ -1159,7 +1159,6 @@ class user extends control } $this->view->title = $this->lang->user->resetPWD; - $this->view->isLogon = $this->user->isLogon(); $this->view->expired = $expired; $this->view->user = empty($user) ? '' : $user; diff --git a/module/user/js/resetpassword.js b/module/user/js/resetpassword.js index cf0e722dc7..f555d709c3 100644 --- a/module/user/js/resetpassword.js +++ b/module/user/js/resetpassword.js @@ -6,7 +6,7 @@ $(function() { var time = $('#time').text(); if(time == 0) window.location.href = $('.alert .btn').attr('href'); - $('#time').text(time-1 <=0 ? 0 : time -1); + $('#time').text(time - 1 <= 0 ? 0 : time - 1); }, 1000); } diff --git a/module/user/view/forgetpassword.html.php b/module/user/view/forgetpassword.html.php index 2f3de19ea3..d8d452f839 100644 --- a/module/user/view/forgetpassword.html.php +++ b/module/user/view/forgetpassword.html.php @@ -29,10 +29,10 @@ include '../../common/view/header.lite.html.php'; user->resetTitle, '', "class='resetBox'");?> - user->submit); - echo html::a(inlink('login'), $lang->goback, '', 'class="btn btn-wide"'); - ?> + user->submit); + echo html::a(inlink('login'), $lang->goback, '', 'class="btn btn-wide"'); + ?> diff --git a/module/user/view/resetpassword.html.php b/module/user/view/resetpassword.html.php index e387106bff..82269fd344 100644 --- a/module/user/view/resetpassword.html.php +++ b/module/user/view/resetpassword.html.php @@ -14,7 +14,7 @@ include '../../common/view/header.lite.html.php';
-
user->linkExpired . sprintf($lang->user->jumping, $isLogon ? helper::createLink('my', 'index') : inlink('login'));?>
+
user->linkExpired . sprintf($lang->user->jumping, inlink('login'));?>
@@ -35,11 +35,11 @@ include '../../common/view/header.lite.html.php'; - account); - echo html::submitButton($lang->user->submit); - echo html::backButton(); - ?> + account); + echo html::submitButton($lang->user->submit); + echo html::backButton(); + ?>