网站配置
This commit is contained in:
parent
24c4d52e4d
commit
6534827c4e
@ -4,6 +4,7 @@ namespace app\middleware;
|
||||
use think\facade\Session;
|
||||
use think\facade\Cookie;
|
||||
use think\facade\Db;
|
||||
use think\facade\Config;
|
||||
|
||||
class LoginCookie
|
||||
{
|
||||
@ -18,7 +19,7 @@ class LoginCookie
|
||||
$user = Db::name('user')->where('id',$userId)->find();
|
||||
if($user){
|
||||
//验证cookie
|
||||
$salt = 'taoler';
|
||||
$salt = Config::get('taoler.salt');
|
||||
$auth = md5($user['name'].$salt).":".$userId;
|
||||
if($auth==$cooAuth){
|
||||
Session::set('user_name',$user['name']);
|
||||
|
@ -5,6 +5,6 @@
|
||||
|
||||
return [
|
||||
//版本配置
|
||||
'version' => '1.6.3',
|
||||
'version' => '1.6.4',
|
||||
'salt' => 'taoler'
|
||||
];
|
Loading…
Reference in New Issue
Block a user