DESKTOP-2STQMTS\Administrator hace 1 año
padre
commit
3a3da65a60
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      app/Http/Controllers/Api/UserController.php

+ 4 - 2
app/Http/Controllers/Api/UserController.php

@@ -270,8 +270,10 @@ class UserController extends FrontController
      */
     function checkLogin($m_id,$token){
         $member = WxUser::where('id',$m_id)->select(['id','token_str'])->first();
-
-        if ($member['token_str'] != $token || empty($member)) {
+        if(empty($member)){
+            return false;
+        }
+        if ($member['token_str'] != $token) {
             return false;
         }
         return true;