Merge pull request #39175 from shdehnavi/settings_app_users_controller_square_bracket_syntax

use square bracket syntax to modify array
This commit is contained in:
Christoph Wurst 2023-09-27 20:31:11 +02:00 committed by GitHub
commit dd3cd29224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,7 +223,7 @@ class UsersController extends Controller {
foreach ($groups as $key => $group) {
// $userCount += (int)$group['usercount'];
array_push($groupsNames, $group['name']);
$groupsNames[] = $group['name'];
// we prevent subadmins from looking up themselves
// so we lower the count of the groups he belongs to
if (array_key_exists($group['id'], $userGroups)) {