* change for verify password.
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
<td><?php echo $user->account . html::hidden('account',$user->account);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->originalPwd;?></th>
|
||||
<td><?php echo html::password('originalPwd', '', "class='form-control'");?></td>
|
||||
<th><?php echo $lang->user->originalPassword;?></th>
|
||||
<td><?php echo html::password('originalPassword', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->password;?></th>
|
||||
|
||||
@@ -102,8 +102,11 @@
|
||||
<legend><?php echo $lang->user->verify;?></legend>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-90px'><?php echo $lang->user->verifyPwd;?></th>
|
||||
<td><?php echo html::password('verifyPwd', '', "class='form-control' placeholder='{$lang->user->placeholder->verify}'");?></td>
|
||||
<th class='w-120px'><?php echo $lang->user->verifyPassword;?></th>
|
||||
<td>
|
||||
<div class="required required-wrapper"></div>
|
||||
<?php echo html::password('verifyPassword', '', "class='form-control' placeholder='{$lang->user->placeholder->verify}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -538,7 +538,7 @@ class user extends control
|
||||
if(strpos($this->app->company->admins, ",{$this->app->user->account},") !== false and $this->app->user->account == $user->account) return;
|
||||
if($_POST)
|
||||
{
|
||||
if(md5($this->post->verifyPwd) != $this->app->user->password) die(js::alert($this->lang->user->error->verifyPwd));
|
||||
if(md5($this->post->verifyPassword) != $this->app->user->password) die(js::alert($this->lang->user->error->verifyPassword));
|
||||
$this->user->delete(TABLE_USER, $userID);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
@@ -657,7 +657,7 @@ class user extends control
|
||||
if($this->post->keepLogin) $this->user->keepLogin($user);
|
||||
|
||||
/* Check password. */
|
||||
if(isset($this->config->safe->mode) and $this->user->computePasswordStrength($password) < $this->config->safe->mode) echo js::alert($this->lang->user->weakPwd);
|
||||
if(isset($this->config->safe->mode) and $this->user->computePasswordStrength($password) < $this->config->safe->mode) echo js::alert($this->lang->user->weakPassword);
|
||||
|
||||
/* Go to the referer. */
|
||||
if($this->post->referer and
|
||||
|
||||
+10
-9
@@ -44,8 +44,8 @@ $lang->user->ip = 'Last IP';
|
||||
$lang->user->last = 'Last login';
|
||||
$lang->user->status = 'Status';
|
||||
$lang->user->ditto = 'Ditto';
|
||||
$lang->user->originalPwd = 'Original password';
|
||||
$lang->user->verifyPwd = 'Verify password';
|
||||
$lang->user->originalPassword = 'Original password';
|
||||
$lang->user->verifyPassword = 'Enter your password';
|
||||
|
||||
$lang->user->index = "Index";
|
||||
$lang->user->view = "Info";
|
||||
@@ -102,11 +102,11 @@ $lang->user->testTask2Him = 'His task';
|
||||
$lang->user->case2Him = 'His case';
|
||||
$lang->user->caseByHim = 'Case he opened';
|
||||
|
||||
$lang->user->errorDeny = "Sorry, you can't access the <b>%s</b> module's <b>%s</b> feature";
|
||||
$lang->user->loginFailed = "Login failed, please check your account and password.";
|
||||
$lang->user->lockWarning = "You only have %s times to try.";
|
||||
$lang->user->loginLocked = "You try the password too many times, please contact the administrator or try again after %s minutes.";
|
||||
$lang->user->weakPwd = "Your password strength is less than the system settings.";
|
||||
$lang->user->errorDeny = "Sorry, you can't access the <b>%s</b> module's <b>%s</b> feature";
|
||||
$lang->user->loginFailed = "Login failed, please check your account and password.";
|
||||
$lang->user->lockWarning = "You only have %s times to try.";
|
||||
$lang->user->loginLocked = "You try the password too many times, please contact the administrator or try again after %s minutes.";
|
||||
$lang->user->weakPassword = "Your password strength is less than the system settings.";
|
||||
|
||||
$lang->user->roleList[''] = '';
|
||||
$lang->user->roleList['dev'] = 'Developer';
|
||||
@@ -148,8 +148,9 @@ $lang->user->error->realname = "ID %s,please input realname";
|
||||
$lang->user->error->password = "ID %s,password must be six letters at least";
|
||||
$lang->user->error->mail = "ID %s,please input correct email address";
|
||||
$lang->user->error->role = "ID %s,please input role";
|
||||
$lang->user->error->verifyPwd = "Please enter the correct password";
|
||||
$lang->user->error->originalPwd = "The original password is not correct";
|
||||
|
||||
$lang->user->error->verifyPassword = "Password error security verification. Please enter your login password.";
|
||||
$lang->user->error->originalPassword = "The original password is not correct";
|
||||
|
||||
$lang->user->contacts = new stdclass();
|
||||
$lang->user->contacts->common = 'Contacts';
|
||||
|
||||
@@ -44,8 +44,8 @@ $lang->user->ip = '最后IP';
|
||||
$lang->user->last = '最后登录';
|
||||
$lang->user->status = '状态';
|
||||
$lang->user->ditto = '同上';
|
||||
$lang->user->originalPwd = '原密码';
|
||||
$lang->user->verifyPwd = '验证密码';
|
||||
$lang->user->originalPassword = '原密码';
|
||||
$lang->user->verifyPassword = '请输入你的密码';
|
||||
|
||||
$lang->user->index = "用户视图首页";
|
||||
$lang->user->view = "用户详情";
|
||||
@@ -102,11 +102,11 @@ $lang->user->testTask2Him = '他的任务';
|
||||
$lang->user->case2Him = '给他的用例';
|
||||
$lang->user->caseByHim = '他建的用例';
|
||||
|
||||
$lang->user->errorDeny = "抱歉,您无权访问『<b>%s</b>』模块的『<b>%s</b>』功能。请联系管理员获取权限。点击后退返回上页。";
|
||||
$lang->user->loginFailed = "登录失败,请检查您的用户名或密码是否填写正确。";
|
||||
$lang->user->lockWarning = "您还有%s次尝试机会。";
|
||||
$lang->user->loginLocked = "密码尝试次数太多,请联系管理员解锁,或%s分钟后重试。";
|
||||
$lang->user->weakPwd = "您的密码强度小于系统设定。";
|
||||
$lang->user->errorDeny = "抱歉,您无权访问『<b>%s</b>』模块的『<b>%s</b>』功能。请联系管理员获取权限。点击后退返回上页。";
|
||||
$lang->user->loginFailed = "登录失败,请检查您的用户名或密码是否填写正确。";
|
||||
$lang->user->lockWarning = "您还有%s次尝试机会。";
|
||||
$lang->user->loginLocked = "密码尝试次数太多,请联系管理员解锁,或%s分钟后重试。";
|
||||
$lang->user->weakPassword = "您的密码强度小于系统设定。";
|
||||
|
||||
$lang->user->roleList[''] = '';
|
||||
$lang->user->roleList['dev'] = '研发';
|
||||
@@ -148,8 +148,9 @@ $lang->user->error->realname = "ID %s,必须填写真实姓名";
|
||||
$lang->user->error->password = "ID %s,密码必须六位以上";
|
||||
$lang->user->error->mail = "ID %s,请填写正确的邮箱地址";
|
||||
$lang->user->error->role = "ID %s,职位不能为空";
|
||||
$lang->user->error->verifyPwd = "请输入正确验证密码";
|
||||
$lang->user->error->originalPwd = "原密码不正确";
|
||||
|
||||
$lang->user->error->verifyPassword = "安全验证密码错误,请输入你的登录密码";
|
||||
$lang->user->error->originalPassword = "原密码不正确";
|
||||
|
||||
$lang->user->contacts = new stdclass();
|
||||
$lang->user->contacts->common = '联系人';
|
||||
|
||||
+16
-16
@@ -206,18 +206,18 @@ class userModel extends model
|
||||
->setDefault('join', '0000-00-00')
|
||||
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))
|
||||
->setIF($this->post->password1 == false, 'password', '')
|
||||
->remove('group, password1, password2, verifyPwd')
|
||||
->remove('group, password1, password2, verifyPassword')
|
||||
->get();
|
||||
|
||||
if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode)
|
||||
{
|
||||
dao::$errors['password1'][] = $this->lang->user->weakPwd;
|
||||
dao::$errors['password1'][] = $this->lang->user->weakPassword;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(empty($_POST['verifyPwd']) or md5($this->post->verifyPwd) != $this->app->user->password)
|
||||
if(empty($_POST['verifyPassword']) or md5($this->post->verifyPassword) != $this->app->user->password)
|
||||
{
|
||||
dao::$errors['verifyPwd'][] = $this->lang->user->error->verifyPwd;
|
||||
dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ class userModel extends model
|
||||
*/
|
||||
public function batchCreate()
|
||||
{
|
||||
if(empty($_POST['verifyPwd']) or md5($this->post->verifyPwd) != $this->app->user->password) die(js::alert($this->lang->user->error->verifyPwd));
|
||||
if(empty($_POST['verifyPassword']) or md5($this->post->verifyPassword) != $this->app->user->password) die(js::alert($this->lang->user->error->verifyPassword));
|
||||
|
||||
$users = fixer::input('post')->get();
|
||||
$data = array();
|
||||
@@ -319,18 +319,18 @@ class userModel extends model
|
||||
$user = fixer::input('post')
|
||||
->setDefault('join', '0000-00-00')
|
||||
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))
|
||||
->remove('password1, password2, groups,verifyPwd')
|
||||
->remove('password1, password2, groups,verifyPassword')
|
||||
->get();
|
||||
|
||||
if(isset($this->config->safe->mode) and $user->password and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode)
|
||||
{
|
||||
dao::$errors['password1'][] = $this->lang->user->weakPwd;
|
||||
dao::$errors['password1'][] = $this->lang->user->weakPassword;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(empty($_POST['verifyPwd']) or md5($this->post->verifyPwd) != $this->app->user->password)
|
||||
if(empty($_POST['verifyPassword']) or md5($this->post->verifyPassword) != $this->app->user->password)
|
||||
{
|
||||
dao::$errors['verifyPwd'][] = $this->lang->user->error->verifyPwd;
|
||||
dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ class userModel extends model
|
||||
*/
|
||||
public function batchEdit()
|
||||
{
|
||||
if(empty($_POST['verifyPwd']) or md5($this->post->verifyPwd) != $this->app->user->password) die(js::alert($this->lang->user->error->verifyPwd));
|
||||
if(empty($_POST['verifyPassword']) or md5($this->post->verifyPassword) != $this->app->user->password) die(js::alert($this->lang->user->error->verifyPassword));
|
||||
|
||||
$oldUsers = $this->dao->select('id, account')->from(TABLE_USER)->where('id')->in(array_keys($this->post->account))->fetchPairs('id', 'account');
|
||||
$accountGroup = $this->dao->select('id, account')->from(TABLE_USER)->where('account')->in($this->post->account)->fetchGroup('account', 'id');
|
||||
@@ -435,18 +435,18 @@ class userModel extends model
|
||||
|
||||
$user = fixer::input('post')
|
||||
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))
|
||||
->remove('account, password1, password2, originalPwd')
|
||||
->remove('account, password1, password2, originalPassword')
|
||||
->get();
|
||||
|
||||
if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode)
|
||||
{
|
||||
dao::$errors['password1'][] = $this->lang->user->weakPwd;
|
||||
dao::$errors['password1'][] = $this->lang->user->weakPassword;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(empty($_POST['originalPwd']) or md5($this->post->originalPwd) != $this->app->user->password)
|
||||
if(empty($_POST['originalPassword']) or md5($this->post->originalPassword) != $this->app->user->password)
|
||||
{
|
||||
dao::$errors['originalPwd'][] = $this->lang->user->error->originalPwd;
|
||||
dao::$errors['originalPassword'][] = $this->lang->user->error->originalPassword;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -460,9 +460,9 @@ class userModel extends model
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkPassword($canNoPwd = false)
|
||||
public function checkPassword($canNoPassword = false)
|
||||
{
|
||||
if(!$canNoPwd and empty($_POST['password1'])) dao::$errors['password'][] = sprintf($this->lang->error->notempty, $this->lang->user->password);
|
||||
if(!$canNoPassword and empty($_POST['password1'])) dao::$errors['password'][] = sprintf($this->lang->error->notempty, $this->lang->user->password);
|
||||
if($this->post->password1 != false)
|
||||
{
|
||||
if($this->post->password1 != $this->post->password2) dao::$errors['password'][] = $this->lang->error->passwordsame;
|
||||
|
||||
@@ -58,8 +58,11 @@
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $lang->user->verifyPwd?></th>
|
||||
<td colspan='7'><?php echo html::password('verifyPwd', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?></td>
|
||||
<th colspan='2'><?php echo $lang->user->verifyPassword?></th>
|
||||
<td colspan='7'>
|
||||
<div class="required required-wrapper"></div>
|
||||
<?php echo html::password('verifyPassword', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan='9' class='text-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
</table>
|
||||
|
||||
@@ -54,8 +54,11 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $lang->user->verifyPwd?></th>
|
||||
<td colspan='6'><?php echo html::password('verifyPwd', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?></td>
|
||||
<th colspan='2'><?php echo $lang->user->verifyPassword?></th>
|
||||
<td colspan='6'>
|
||||
<div class="required required-wrapper"></div>
|
||||
<?php echo html::password('verifyPassword', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan='8' class='text-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
</table>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<form class='form-condensed mw-700px' method='post' target='hiddenwin' id='dataform'>
|
||||
<table align='center' class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->user->dept;?></th>
|
||||
<th class='w-120px'><?php echo $lang->user->dept;?></th>
|
||||
<td class='w-p50'><?php echo html::select('dept', $depts, $deptID, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -75,8 +75,11 @@
|
||||
<td><?php echo html::radio('gender', (array)$lang->user->genderList, 'm');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->verifyPwd;?></th>
|
||||
<td><?php echo html::password('verifyPwd', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?></td>
|
||||
<th><?php echo $lang->user->verifyPassword;?></th>
|
||||
<td>
|
||||
<div class="required required-wrapper"></div>
|
||||
<?php echo html::password('verifyPassword', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><th></th><td><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
|
||||
@@ -20,10 +20,11 @@
|
||||
<table class='w-p100 table-form'>
|
||||
<tr>
|
||||
<th class='w-100px text-right'>
|
||||
<?php echo $lang->user->verifyPwd;?>
|
||||
<?php echo $lang->user->verifyPassword;?>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo html::input('verifyPwd', '', "class='form-control' placeholder='{$lang->user->placeholder->verify}'");?>
|
||||
<div class="required required-wrapper"></div>
|
||||
<?php echo html::input('verifyPassword', '', "class='form-control' placeholder='{$lang->user->placeholder->verify}'");?>
|
||||
</td>
|
||||
<td class='w-100px'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
|
||||
@@ -102,8 +102,11 @@
|
||||
<table align='center' class='table table-form'>
|
||||
<caption class='text-left text-muted'><?php echo $lang->user->verify;?></caption>
|
||||
<tr>
|
||||
<th class='w-90px'><?php echo $lang->user->verifyPwd;?></th>
|
||||
<td><?php echo html::password('verifyPwd', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?></td>
|
||||
<th class='w-120px'><?php echo $lang->user->verifyPassword;?></th>
|
||||
<td>
|
||||
<div class="required required-wrapper"></div>
|
||||
<?php echo html::password('verifyPassword', '', "class='form-control' autocomplete='off' placeholder='{$lang->user->placeholder->verify}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='text-center'><?php echo html::submitButton() . html::backButton();?></td></tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user