mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2024-11-16 11:42:35 +08:00
fix
This commit is contained in:
parent
5cd6b108f0
commit
8e4fd32f8c
|
@ -12,7 +12,7 @@ class AuthUser
|
|||
$islogin = false;
|
||||
$cookie = cookie('user_token');
|
||||
$user = null;
|
||||
if($cookie){
|
||||
if($cookie && config_get('sys_key')){
|
||||
$token=authcode($cookie, 'DECODE', config_get('sys_key'));
|
||||
if($token){
|
||||
list($type, $uid, $sid, $expiretime) = explode("\t", $token);
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace app\middleware;
|
|||
use Exception;
|
||||
use think\facade\Db;
|
||||
use think\facade\Config;
|
||||
use think\facade\Cache;
|
||||
|
||||
class LoadConfig
|
||||
{
|
||||
|
@ -33,6 +34,7 @@ class LoadConfig
|
|||
$res = Db::name('config')->cache('configs',0)->column('value','key');
|
||||
if(empty($res['sys_key']) && !empty(env('app.sys_key'))){
|
||||
config_set('sys_key', env('app.sys_key'));
|
||||
Cache::delete('configs');
|
||||
$res['sys_key'] = env('app.sys_key');
|
||||
}
|
||||
Config::set($res, 'sys');
|
||||
|
|
Loading…
Reference in New Issue
Block a user