* Finish task #57894.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ include '../../common/view/header.lite.html.php';
|
||||
<tr><?php echo html::a(inlink('reset'), $lang->user->resetTitle, '', "class='resetBox'");?></tr>
|
||||
<tr>
|
||||
<td colspan='2' class="form-actions text-center">
|
||||
<?php
|
||||
echo html::submitButton($lang->user->submit);
|
||||
echo html::a(inlink('login'), $lang->goback, '', 'class="btn btn-wide"');
|
||||
?>
|
||||
<?php
|
||||
echo html::submitButton($lang->user->submit);
|
||||
echo html::a(inlink('login'), $lang->goback, '', 'class="btn btn-wide"');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -14,7 +14,7 @@ include '../../common/view/header.lite.html.php';
|
||||
<?php if($expired):?>
|
||||
<style>body {background: none;}</style>
|
||||
<div class="alert alert-danger">
|
||||
<div class="content"><?php echo $lang->user->linkExpired . sprintf($lang->user->jumping, $isLogon ? helper::createLink('my', 'index') : inlink('login'));?></div>
|
||||
<div class="content"><?php echo $lang->user->linkExpired . sprintf($lang->user->jumping, inlink('login'));?></div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<main id="main" class="fade no-padding">
|
||||
@@ -35,11 +35,11 @@ include '../../common/view/header.lite.html.php';
|
||||
</div>
|
||||
<tr>
|
||||
<td colspan='2' class="form-actions text-center">
|
||||
<?php
|
||||
echo html::hidden('account', $user->account);
|
||||
echo html::submitButton($lang->user->submit);
|
||||
echo html::backButton();
|
||||
?>
|
||||
<?php
|
||||
echo html::hidden('account', $user->account);
|
||||
echo html::submitButton($lang->user->submit);
|
||||
echo html::backButton();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user