wesmiler hace 3 años
padre
commit
f4f7c58d4e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      source/application/store/service/Auth.php

+ 2 - 2
source/application/store/service/Auth.php

@@ -77,9 +77,9 @@ class Auth
     {
         // 商家登录信息
         $this->store = Session::get('yoshop_store');
-        
+        $this->store = $this->store? $this->store : [];
         // 当前用户信息
-        $storeUserId = $this->store && isset($this->store['user']['store_user_id'])? $this->store['user']['store_user_id'] : 0;
+        $storeUserId = isset($this->store['user']['store_user_id'])? $this->store['user']['store_user_id'] : 0;
         $this->user = User::detail($storeUserId);
     }