diff --git a/pages/invitation/InvitationHandler.php b/pages/invitation/InvitationHandler.php index 929f047087c..5e8b156a9e5 100644 --- a/pages/invitation/InvitationHandler.php +++ b/pages/invitation/InvitationHandler.php @@ -26,6 +26,8 @@ use PKP\invitation\core\enums\InvitationAction; use PKP\invitation\core\Invitation; use PKP\invitation\stepTypes\SendInvitationStep; +use PKP\userGroup\relationships\UserUserGroup; +use PKP\userGroup\UserGroup; class InvitationHandler extends Handler { @@ -301,7 +303,7 @@ public function editUser($args, $request): void ), ]); $templateMgr->assign([ - 'pageComponent' => 'PageOJS', + 'pageComponent' => 'Page', 'breadcrumbs' => $breadcrumbs, 'pageWidth' => TemplateManager::PAGE_WIDTH_FULL, ]); @@ -316,6 +318,20 @@ public function editUser($args, $request): void */ private function getUserUserGroups(int $id): array { - return Repo::userGroup()->userUserGroups($id)->toArray(); + $userGroups = []; + $userUserGroups = UserUserGroup::query() + ->withUserId($id) + ->get() + ->toArray(); + foreach ($userUserGroups as $key => $userUserGroup) { + if($userUserGroup['userGroupId'] != 1){ + $userGroups[$key] = $userUserGroup; + $userGroups[$key]['masthead'] = $userUserGroup['masthead'] === 1; + $userGroups[$key]['name'] = Repo::userGroup() + ->get($userUserGroup['userGroupId']) + ->toArray()['name'][Locale::getLocale()]; + } + } + return $userGroups; } }