Browse Source

优化密码长度判断

新增个人资料手机号显示
Karson 2 years ago
parent
commit
a7983055fc

+ 1 - 1
application/admin/command/Install/fastadmin.sql

@@ -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 '删除时间',

+ 1 - 1
application/admin/controller/general/Profile.php

@@ -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();

+ 5 - 2
application/admin/view/general/profile/index.html

@@ -56,14 +56,17 @@
                             <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"/>
                         </div>