ComposerUpdate

This commit is contained in:
Anyon 2019-11-23 20:14:17 +08:00
parent bea693c868
commit 1d037be33f
6 changed files with 22 additions and 22 deletions

View File

@ -92,16 +92,12 @@ class Index extends Controller
$this->verify = true;
$this->_form('SystemUser', 'admin@user/pass', 'id', [], ['id' => $id]);
} else {
$data = [
'password' => $this->app->request->post('password'),
'repassword' => $this->app->request->post('repassword'),
'oldpassword' => $this->app->request->post('oldpassword'),
];
if (empty($data['password'])) $this->error('登录密码不能为空!');
if (empty($data['oldpassword'])) $this->error('旧密码不能为空!');
if ($data['repassword'] !== $data['password']) {
$this->error('重复密码与登录密码不匹配,请重新输入!');
}
$data = $this->_vali([
'password.require' => '登录密码不能为空!',
'repassword.require' => '重复密码不能为空!',
'oldpassword.require' => '旧密码不能为空!',
'password.confirm:repassword' => '验证密码与新密码不匹配!',
]);
$user = $this->app->db->name('SystemUser')->where(['id' => $id])->find();
if (md5($data['oldpassword']) !== $user['password']) {
$this->error('旧密码验证失败,请重新输入!');

View File

@ -37,9 +37,9 @@
<div class="layui-form-item">
<label class="relative block">
<span class="color-green font-w7">重复登录密码</span>
<span class="color-green font-w7">验证登录密码</span>
<span class="color-desc margin-left-5">Retype Password</span>
<input type="password" name="repassword" maxlength="32" pattern="^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,32}$" required placeholder="请输入重复登录密码" class="layui-input">
<input type="password" name="repassword" maxlength="32" pattern="^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,32}$" required placeholder="请输入验证登录密码" class="layui-input">
</label>
<p class="color-desc">密码必需包含大小写字母、数字、符号的任意两者组合。</p>
</div>

8
composer.lock generated
View File

@ -783,12 +783,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "a01d99bd039989a587fdc0c9d38e300b86a71045"
"reference": "d59b40f099926275e5ecec372624ab7212c27bc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a01d99bd039989a587fdc0c9d38e300b86a71045",
"reference": "a01d99bd039989a587fdc0c9d38e300b86a71045",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/d59b40f099926275e5ecec372624ab7212c27bc0",
"reference": "d59b40f099926275e5ecec372624ab7212c27bc0",
"shasum": "",
"mirrors": [
{
@ -832,7 +832,7 @@
],
"description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top",
"time": "2019-11-23T10:28:22+00:00"
"time": "2019-11-23T12:12:24+00:00"
}
],
"packages-dev": [],

View File

@ -805,12 +805,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "a01d99bd039989a587fdc0c9d38e300b86a71045"
"reference": "d59b40f099926275e5ecec372624ab7212c27bc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a01d99bd039989a587fdc0c9d38e300b86a71045",
"reference": "a01d99bd039989a587fdc0c9d38e300b86a71045",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/d59b40f099926275e5ecec372624ab7212c27bc0",
"reference": "d59b40f099926275e5ecec372624ab7212c27bc0",
"shasum": "",
"mirrors": [
{
@ -826,7 +826,7 @@
"ext-json": "*",
"topthink/framework": "^6.0"
},
"time": "2019-11-23T10:28:22+00:00",
"time": "2019-11-23T12:12:24+00:00",
"type": "library",
"extra": {
"think": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2019-11-23 18:32:47
// This file is automatically generated at:2019-11-23 20:14:07
declare (strict_types = 1);
return array (
0 => 'think\\app\\Service',

View File

@ -146,7 +146,11 @@ class CaptchaService extends Service
$_x = $this->width / $this->codelen;
for ($i = 0; $i < $this->codelen; $i++) {
$this->fontcolor = imagecolorallocate($this->img, mt_rand(0, 156), mt_rand(0, 156), mt_rand(0, 156));
imagettftext($this->img, $this->fontsize, mt_rand(-30, 30), $_x * $i + mt_rand(1, 5), $this->height / 1.4, $this->fontcolor, $this->font, $this->code[$i]);
if (function_exists('imagettftext')) {
imagettftext($this->img, $this->fontsize, mt_rand(-30, 30), $_x * $i + mt_rand(1, 5), $this->height / 1.4, $this->fontcolor, $this->font, $this->code[$i]);
} else {
imagestring($this->img, 15, $_x * $i + mt_rand(10, 15), mt_rand(10, 30), $this->code[$i], $this->fontcolor);
}
}
ob_start();
imagepng($this->img);