Kirin 4 vuotta sitten
vanhempi
commit
7ab93ae0b8
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      app/http/middleware/AuthTokenMiddleware.php

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

@@ -33,9 +33,9 @@ class AuthTokenMiddleware implements MiddlewareInterface
 //        if (!$token) $token = trim(ltrim($request->header('Authorization'), 'Bearer'));//正式版,删除此行,某些服务器无法获取到token调整为 Authori-zation
         try {
             $authInfo = UserRepository::parseToken($token, $request->site_id());
-            if (!in_array($request->action(), ['binding_phone', 'user', 'userInfo', 'verify']) && ($authInfo['user']['account'] != $authInfo['user']['phone'] && $authInfo['user']['account'] != $authInfo['user']['email'])) {
-                return app('json')->make('400', '请先绑定手机号或邮箱');
-            }
+//            if (!in_array($request->action(), ['binding_phone', 'user', 'userInfo', 'verify']) && ($authInfo['user']['account'] != $authInfo['user']['phone'] && $authInfo['user']['account'] != $authInfo['user']['email'])) {
+//                return app('json')->make('400', '请先绑定手机号或邮箱');
+//            }
             $authInfo['user']['level_info'] = UserLevel::getUserLevelInfo(UserLevel::getUserLevel($authInfo['user']['uid']));
             $authInfo['user']['point'] = UserPointPlan::where('uid', $authInfo['user']['uid'])->select();
         } catch (AuthException $e) {