Commit 29cef803 by 王召彬

撤销修改User.php

parent ef0fda59
......@@ -15,7 +15,7 @@ use Hdll\Services\Common\Enum\TestEnum;
use Swoft\App;
use Swoft\Bean\Annotation\Bean;
use Swoft\Core\RequestContext;
use Hdll\Services\Common\Lib\Redis;
use Swoft\Redis\Redis;
/**
* 用户实体
......@@ -165,12 +165,8 @@ class User
return [false,AuthError::GET_TOKEN_ERROR];
}
/**
* @var Redis $redis
*/
$redis = new Redis();
$redis->setPrefix("AUTH:");
$info = $redis->get($token);
$redis = App::getBean(Redis::class);
$info = $redis->get("AUTH:".$token);
if ( empty($info) ) {
return [false,AuthError::NOT_FOUND_USER];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment