lvhao před 13 hodinami
rodič
revize
d4307febda
1 změnil soubory, kde provedl 8 přidání a 7 odebrání
  1. 8 7
      core/CoreApp/controllers/Lyerpapi/v1/User.php

+ 8 - 7
core/CoreApp/controllers/Lyerpapi/v1/User.php

@@ -46,13 +46,14 @@ class User extends Lyapi_Controller{
             if($userinfo['userpass'] != $pass){
                 $this->_json_error('密码错误','500');
             }
-            $power = $this->power->read($userinfo['power']);
-            if(empty($power)){
-                $this->_json_error('角色未设置','500');
-            }
-            if(empty($power['lyapiid'])){
-                $this->_json_error('权限未设置','500');
-            }
+           
+        }
+        $power = $this->power->read($userinfo['power']);
+        if(empty($power)){
+            $this->_json_error('角色未设置','500');
+        }
+        if(empty($power['lyapiid'])){
+            $this->_json_error('权限未设置','500');
         }
        
         $lyapiids = explode("|",trim($power['lyapiid'],"|"));