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