|
...
|
...
|
@@ -82,7 +82,7 @@ class UserLoginLogic |
|
|
|
$token = md5(uniqid().$info['id']);
|
|
|
|
//存储缓存
|
|
|
|
$info['token'] = $token;
|
|
|
|
Cache::add($token,$info,3600 * 6);
|
|
|
|
Cache::add($token,$info,3600 * 12);
|
|
|
|
//更新用户信息
|
|
|
|
$rs = $this->model->edit(['token'=>$token],['id'=>$info['id']]);
|
|
|
|
if($rs === false){
|
|
...
|
...
|
@@ -121,7 +121,7 @@ class UserLoginLogic |
|
|
|
//存储缓存
|
|
|
|
$info['token'] = $token;
|
|
|
|
$info['manager_id'] = $data['manager_id'];//代表自动登录写入日志
|
|
|
|
Cache::add($token,$info,3600 * 6);
|
|
|
|
Cache::add($token,$info,3600 * 12);
|
|
|
|
}
|
|
|
|
Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(),
|
|
|
|
'project_id'=>$info['project_id'], 'type'=>1 ,'remark' => '自动登录,操作管理员为:'.$data['manager_id']]);
|
...
|
...
|
|