Skip to content

Commit

Permalink
pkp/pkp-lib#10506 usage update after porting UserGroup to Eloquent
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafsa-Naeem committed Nov 18, 2024
1 parent 90ea703 commit 785b413
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CitationStyleLanguageSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function fetch($request, $template = null, $display = false): ?string
$userGroups = Repo::userGroup()->getByRoleIds([Role::ROLE_ID_AUTHOR], $contextId);
$userGroups = $userGroups->toArray();
foreach ($userGroups as $userGroup) {
$allUserGroups[(int) $userGroup->getId()] = $userGroup->getLocalizedName();
$allUserGroups[(int) $userGroup->id] = $userGroup->getLocalizedData('name');
}
asort($allUserGroups);

Expand Down
2 changes: 1 addition & 1 deletion pages/CitationStyleLanguageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ protected function canUserAccess($context, $user, $userRoles)
continue;
}
$userGroup = Repo::userGroup()->get($assignment->getUserGroupId($context->getId()));
if (in_array($userGroup->getRoleId(), [Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_ASSISTANT])) {
if (in_array($userGroup->roleId, [Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_ASSISTANT])) {
return true;
}
}
Expand Down

0 comments on commit 785b413

Please sign in to comment.