am using mdmsoft / yii2-admin plugin is there any way to get user ids who has access/permission to specific route. I need to show only those user who can access the specific action in a dropdown.
Before I was doing this but I want this dynamic based on Helper::checkRoute() method
$usersProfiles = UserProfile::find()->all();
$authAssignmentHeadUserIds = AuthAssignment::find()
->orWhere(['item_name' => 'marketing-head'])
->orWhere(['item_name' => 'media-head'])
->orWhere(['item_name' => 'production-head'])
->select(['user_id'])
->all();
$userHeadProfiles = UserProfile::find()
->where(['in', 'user_id', $authAssignmentHeadUserIds])->all();
I was able to fetch user ids for routes
Thanks to Shringiraj Dewangan who used array column in his answer, that was the missing piece