优化密码长度判断

新增个人资料手机号显示
pull/408/MERGE
Karson 2022-05-30 11:24:23 +08:00
parent 3fd25c3de0
commit a7983055fc
3 changed files with 7 additions and 4 deletions

View File

@ -420,7 +420,7 @@ CREATE TABLE `fa_test` (
`activitytime` datetime DEFAULT NULL COMMENT '活动时间(datetime)',
`year` year(4) DEFAULT NULL COMMENT '',
`times` time DEFAULT NULL COMMENT '时间',
`refreshtime` bigint(16) DEFAULT NULL COMMENT '刷新时间(int)',
`refreshtime` bigint(16) DEFAULT NULL COMMENT '刷新时间',
`createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
`updatetime` bigint(16) DEFAULT NULL COMMENT '更新时间',
`deletetime` bigint(16) DEFAULT NULL COMMENT '删除时间',

View File

@ -59,7 +59,7 @@ class Profile extends Backend
$this->error(__("Please input correct email"));
}
if (isset($params['password'])) {
if (!Validate::is($params['password'], "/^[\S]{6,16}$/")) {
if (!Validate::is($params['password'], "/^[\S]{6,30}$/")) {
$this->error(__("Please input correct password"));
}
$params['salt'] = Random::alnum();

View File

@ -56,13 +56,16 @@
<button type="button" id="faupload-avatar" class="faupload" data-input-id="c-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
</div>
<h3 class="profile-username text-center">{$admin.username|htmlentities}</h3>
<h3 class="profile-username text-center">{$admin.nickname|htmlentities}</h3>
<p class="text-muted text-center">{$admin.email|htmlentities}</p>
<div class="form-group">
<label for="username" class="control-label">{:__('Username')}:</label>
<input type="text" class="form-control" id="username" name="row[username]" value="{$admin.username|htmlentities}" disabled/>
</div>
<div class="form-group">
<label for="mobile" class="control-label">{:__('Mobile')}:</label>
<input type="text" class="form-control" id="mobile" name="row[mobile]" value="{$admin.mobile|htmlentities}" disabled/>
</div>
<div class="form-group">
<label for="email" class="control-label">{:__('Email')}:</label>
<input type="text" class="form-control" id="email" name="row[email]" value="{$admin.email|htmlentities}" data-rule="required;email"/>