xiaogang 3 anni fa
parent
commit
b644addd13

+ 0 - 1
app/Admin/Actions/Users/UsersInfo.php

xqd
@@ -35,7 +35,6 @@ class UsersInfo extends Form implements LazyRenderable
         }
         $user->sex = $input['sex'];
         $user->save();
-        Auth::guard('api')->refresh();
         return $this->response()->success('保存成功')->refresh();
     }
 

+ 1 - 1
app/Http/Controllers/Api/AuthorizationsController.php

xqd
@@ -123,7 +123,7 @@ class AuthorizationsController extends Controller
                 throw new Exception("用户不存在");
             }
             $credentials = ['mobile'=>$mobile,'password'=>$password];
-
+            Auth::guard('api')->refresh();
             if (!auth('api')->attempt($credentials)) {
                 throw new Exception("用户名或密码错误");
             }