We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18e0905 commit 7f35227Copy full SHA for 7f35227
classes/security/Validation.php
@@ -503,14 +503,10 @@ public static function getAdministrationLevel(
503
504
// single query to fetch user groups assigned to either user
505
$allUserGroups = UserGroup::query()
506
- ->whereHas(
507
- 'userUserGroups',
508
- fn ($q) =>
509
- $q->withActive()->withUserIds([$administratorUserId, $administeredUserId])
510
- )
511
- ->with(['userUserGroups' => fn ($q) =>
512
513
- ])
+ ->whereHas('userUserGroups', function ($query) use ($administratorUserId, $administeredUserId) {
+ $query->withUserIds([$administratorUserId, $administeredUserId])
+ ->withActive();
+ })
514
->get();
515
516
$administratorMap = [];
0 commit comments