diff --git a/CitationStyleLanguageSettingsForm.php b/CitationStyleLanguageSettingsForm.php index e69c299..a02530f 100644 --- a/CitationStyleLanguageSettingsForm.php +++ b/CitationStyleLanguageSettingsForm.php @@ -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); diff --git a/pages/CitationStyleLanguageHandler.php b/pages/CitationStyleLanguageHandler.php index 11c6c6a..c8ebfc7 100644 --- a/pages/CitationStyleLanguageHandler.php +++ b/pages/CitationStyleLanguageHandler.php @@ -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; } }