Commit 29cef803 by 王召彬

撤销修改User.php

parent ef0fda59
...@@ -15,7 +15,7 @@ use Hdll\Services\Common\Enum\TestEnum; ...@@ -15,7 +15,7 @@ use Hdll\Services\Common\Enum\TestEnum;
use Swoft\App; use Swoft\App;
use Swoft\Bean\Annotation\Bean; use Swoft\Bean\Annotation\Bean;
use Swoft\Core\RequestContext; use Swoft\Core\RequestContext;
use Hdll\Services\Common\Lib\Redis; use Swoft\Redis\Redis;
/** /**
* 用户实体 * 用户实体
...@@ -165,12 +165,8 @@ class User ...@@ -165,12 +165,8 @@ class User
return [false,AuthError::GET_TOKEN_ERROR]; return [false,AuthError::GET_TOKEN_ERROR];
} }
/** $redis = App::getBean(Redis::class);
* @var Redis $redis $info = $redis->get("AUTH:".$token);
*/
$redis = new Redis();
$redis->setPrefix("AUTH:");
$info = $redis->get($token);
if ( empty($info) ) { if ( empty($info) ) {
return [false,AuthError::NOT_FOUND_USER]; 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