正在显示
1 个修改的文件
包含
6 行增加
和
8 行删除
| @@ -115,14 +115,12 @@ class UserLoginLogic | @@ -115,14 +115,12 @@ class UserLoginLogic | ||
| 115 | $this->fail('该项目未找到注册账号'); | 115 | $this->fail('该项目未找到注册账号'); |
| 116 | } | 116 | } |
| 117 | $info = $this->autoAssembleParam($has_user); | 117 | $info = $this->autoAssembleParam($has_user); |
| 118 | - if(!Cache::get($info['token'])){ | ||
| 119 | - //生成新token | ||
| 120 | - $token = md5(uniqid().$info['id']); | ||
| 121 | - //存储缓存 | ||
| 122 | - $info['token'] = $token; | ||
| 123 | - $info['manager_id'] = $data['manager_id'];//代表自动登录写入日志 | ||
| 124 | - Cache::add($token,$info,3600 * 12); | ||
| 125 | - } | 118 | + //生成新token |
| 119 | + $token = md5(uniqid().$info['id']); | ||
| 120 | + //存储缓存 | ||
| 121 | + $info['token'] = $token; | ||
| 122 | + $info['manager_id'] = $data['manager_id'];//代表自动登录写入日志 | ||
| 123 | + Cache::add($token,$info,3600 * 12); | ||
| 126 | Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), | 124 | Common::set_user_login(['user_id'=>$info['id'],'ip'=>request()->ip(), |
| 127 | 'project_id'=>$info['project_id'], 'type'=>1 ,'remark' => '自动登录,操作管理员为:'.$data['manager_id']]); | 125 | 'project_id'=>$info['project_id'], 'type'=>1 ,'remark' => '自动登录,操作管理员为:'.$data['manager_id']]); |
| 128 | return $info; | 126 | return $info; |
-
请 注册 或 登录 后发表评论