From 48463110bd5d2b07a4541e14976628bc20ba5a76 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Thu, 4 May 2023 18:02:08 +0300 Subject: [PATCH] user card search fix 2 --- backend/modules/card/models/UserCardSearch.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/modules/card/models/UserCardSearch.php b/backend/modules/card/models/UserCardSearch.php index fc62f84..9999d45 100755 --- a/backend/modules/card/models/UserCardSearch.php +++ b/backend/modules/card/models/UserCardSearch.php @@ -43,16 +43,16 @@ class UserCardSearch extends UserCard * * @param array $params * - * @return ActiveDataProvider + * @return ActiveDataProvider | bool */ - public function search($params): ActiveDataProvider + public function search($params) { if (Yii::$app->user->can('show_all_profiles')) { $query = UserCard::find(); } else { $manager = Manager::findOne(Yii::$app->user->id); if (!$manager){ - return new ActiveDataProvider(); + return false; } $employeeIdList = ManagerEmployee::find() ->where(['manager_id' => $manager->id])