Skip to content

Commit

Permalink
Merge pull request #137 from Vitaliy-1/i10506_usergroup_eloquent
Browse files Browse the repository at this point in the history
pkp/pkp-lib#10506 Refactor UserGroup to Eloquent Model
  • Loading branch information
Vitaliy-1 authored Dec 16, 2024
2 parents 33e46fc + 904daa2 commit c7e90fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CitationStyleLanguageSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ public function fetch($request, $template = null, $display = false): ?string
}

$allUserGroups = [];
$userGroups = Repo::userGroup()->getByRoleIds([Role::ROLE_ID_AUTHOR], $contextId);
$userGroups = $userGroups->toArray();
$userGroups = Repo::userGroup()->getByRoleIds([Role::ROLE_ID_AUTHOR], $contextId)->all();
foreach ($userGroups as $userGroup) {
$allUserGroups[(int) $userGroup->getId()] = $userGroup->getLocalizedName();
$allUserGroups[(int) $userGroup->id] = $userGroup->getLocalizedData('name');
}
asort($allUserGroups);

Expand Down

0 comments on commit c7e90fa

Please sign in to comment.