user card search fix
This commit is contained in:
parent
5c9411726f
commit
80c11b55ca
@ -15,6 +15,7 @@ class UserCardSearch extends UserCard
|
||||
{
|
||||
public $skills;
|
||||
public $total;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -48,17 +49,10 @@ class UserCardSearch extends UserCard
|
||||
if (Yii::$app->user->can('show_all_profiles')) {
|
||||
$query = UserCard::find();
|
||||
} else {
|
||||
$userCard = User::find()
|
||||
->where(['id' => Yii::$app->user->id])
|
||||
->one();
|
||||
|
||||
$employeeIdList = false;
|
||||
if (isset($userCard->manager)) {
|
||||
$employeeIdList = ManagerEmployee::find()
|
||||
->where(['manager_id' => Yii::$app->user->id])
|
||||
->select('employee_id')
|
||||
->column();
|
||||
}
|
||||
|
||||
$query = UserCard::find()->where(['in', 'user_card.id', $employeeIdList]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user