切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
7 years ago
提交
cd17735befe25e4375b28ad8947ac25704cec00e
1 个父辈
f28089b1
修复后台修改会员密码的BUG
修复命令行创建插件名称的BUG
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
12 行增加
和
7 行删除
application/admin/command/Addon/stubs/info.stub
application/admin/lang/zh-cn/user/user.php
application/admin/model/User.php
application/index/lang/zh-cn/user.php
application/admin/command/Addon/stubs/info.stub
查看文件 @
cd17735
name = {%name%}
title = 插件名称
({%name%})
title = 插件名称
{%name%}
intro = FastAdmin插件
author = yourname
website = http://www.fastadmin.net
...
...
application/admin/lang/zh-cn/user/user.php
查看文件 @
cd17735
...
...
@@ -28,5 +28,6 @@ return [
'Createtime'
=>
'创建时间'
,
'Updatetime'
=>
'更新时间'
,
'Token'
=>
'Token'
,
'Status'
=>
'状态'
'Status'
=>
'状态'
,
'Leave password blank if dont want to change'
=>
'不修改密码请留空'
,
];
...
...
application/admin/model/User.php
查看文件 @
cd17735
...
...
@@ -26,11 +26,14 @@ class User extends Model
self
::
beforeUpdate
(
function
(
$row
)
{
$changed
=
$row
->
getChangedData
();
//如果有修改密码
if
(
isset
(
$changed
[
'password'
]))
{
$salt
=
\fast\Random
::
alnum
();
$row
->
password
=
\app\common\library\Auth
::
instance
()
->
getEncryptPassword
(
$changed
[
'password'
],
$salt
);
$row
->
salt
=
$salt
;
if
(
isset
(
$changed
[
'password'
]))
{
if
(
$changed
[
'password'
])
{
$salt
=
\fast\Random
::
alnum
();
$row
->
password
=
\app\common\library\Auth
::
instance
()
->
getEncryptPassword
(
$changed
[
'password'
],
$salt
);
$row
->
salt
=
$salt
;
}
else
{
unset
(
$row
->
password
);
}
}
});
}
...
...
application/index/lang/zh-cn/user.php
查看文件 @
cd17735
...
...
@@ -36,6 +36,7 @@ return [
'Reset password'
=>
'修改密码'
,
'Reset password by email'
=>
'通过邮箱'
,
'Reset password by mobile'
=>
'通过手机重置'
,
'Reset password successful'
=>
'修改密码成功'
,
'Account is locked'
=>
'账户已经被锁定'
,
'Password is incorrect'
=>
'密码不正确'
,
'Account is incorrect'
=>
'账户不正确'
,
...
...
请
注册
或
登录
后发表评论