增加修改初始密码提示

This commit is contained in:
巴掌 committed 2021-12-30 11:15:10 +08:00
1 parent 636f983117
commit d096d2aa1a
6 files changed
+20 -7

No files matched your search

+7 -1
View File
@@ -69,8 +69,14 @@ class Index extends BaseController
$admin = new \app\admin\model\Admin;
$userinfo = $admin::where('username|phone', $list['username'])
->where('status', 1)
->field('id, lastip, username, ip, denglucishu, lasttime, thistime, password')
->field('id, lastip, username, ip, denglucishu, lasttime, thistime, password, create_time')
->find();
$jyshijian = config('shangma.mimaguoqi');
$now = time();
$jinyong = strtotime("$userinfo->create_time+".$jyshijian." day");
if ($jinyong < $now && $list['password'] == '123456') {
$userinfo->status = false;
}
// 将本次信息上传到服务器上
$userinfo->lastip = $userinfo->ip;
$userinfo->ip = request()->ip();