user card search fix 2
This commit is contained in:
parent
7852fa4fc1
commit
48463110bd
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user