提交 1381014f authored 作者: chengye's avatar chengye

调整基站登录

上级 59739af8
......@@ -32,6 +32,7 @@ class Base extends Controller
$sUser['is_admin'] = $user['is_admin'] === true ? true : false;
$sUser['user_id'] = $user['user_id'];
var_dump($sUser);
//保存加密串到redis
$single->saveKey($user['ukey'],$sUser);
} catch ( \Exception $e){
......
......@@ -85,11 +85,10 @@ class SingleSign {
//将加密串保存到redis
public function saveKey($key,$user=[]){
$encryptKey = substr(md5(config('admin.encrypt_key').$key),0,10);
//存储到redis
if(!$this->instence->get($encryptKey)){
$this->instence->set($encryptKey,json_encode($user),3600);
if($this->instence->get($encryptKey) != ''){
dd($user);
$this->instence->set($encryptKey,json_encode($user),1800);
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论