Kirin 2 mēneši atpakaļ
vecāks
revīzija
0e82372347

+ 1 - 1
app/controller/admin/v1/user/User.php

@@ -503,7 +503,7 @@ class User extends AuthController
             ['street', 0],
             ['spread_uid', -1],
             ['area_admin', -1],
-            ['is_shop', 0],
+            ['is_shop', -1],
             ['area_admin_province', ''],
             ['area_admin_city', ''],
             ['area_admin_district', ''],

+ 1 - 1
app/services/user/UserServices.php

@@ -910,7 +910,7 @@ class UserServices extends BaseServices
             $edit['city'] = $data['city'];
             $edit['area'] = $data['area'];
             $edit['street'] = $data['street'];
-            $edit['is_shop'] = $data['is_shop'] ?? $user['is_shop'];
+            $edit['is_shop'] = (isset($data['is_shop']) && $data['is_shop'] >= 0) ? $data['is_shop'] : $user['is_shop'];
             if (isset($data['extend_info']) && $data['extend_info']) $edit['extend_info'] = $data['extend_info'];
             if ($user['level'] != $data['level']) {
                 /** @var UserLevelServices $userLevelService */