Commit c64e64b4 by feixiang

parseData 优化

parent 2290bed8
...@@ -181,9 +181,9 @@ class User ...@@ -181,9 +181,9 @@ class User
} }
public function initUser() public function initUser($token)
{ {
if ( empty($value) ) { if ( empty($token) ) {
return [false,AuthError::GET_TOKEN_ERROR]; return [false,AuthError::GET_TOKEN_ERROR];
} }
...@@ -191,7 +191,7 @@ class User ...@@ -191,7 +191,7 @@ class User
* @var Redis $redis * @var Redis $redis
*/ */
$redis = App::getBean(Redis::class); $redis = App::getBean(Redis::class);
$info = $redis->get('AUTH:'.$value); $info = $redis->get('AUTH:'.$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