Kirin hace 2 años
padre
commit
39acf069e0
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      app/http/middleware/AuthTokenMiddleware.php

+ 3 - 0
app/http/middleware/AuthTokenMiddleware.php

@@ -33,6 +33,9 @@ class AuthTokenMiddleware implements MiddlewareInterface
             $authInfo['user']['wechat'] = WechatUser::where('uid', $authInfo['user']['uid'])->field('subscribe,user_type')->find();
             $authInfo['user']['group_level_info'] = SystemGroupLevel::where('id', $authInfo['user']['group_level'])->find();
             $authInfo['user']['award_level_info'] = SystemAwardLevel::where('id', $authInfo['user']['award_level'])->find();
+            if ($authInfo['user']['status'] == 0) {
+                return app('json')->fail('账号已被冻结!');
+            }
         } catch (AuthException $e) {
             if ($force)
                 return app('json')->make($e->getCode(), $e->getMessage());