Skip to content

Commit

Permalink
pkp/pkp-lib#10506 Fix subscriber select error
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy-1 committed Dec 13, 2024
1 parent 731016c commit 6a34a25
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ public function initialize($request, $args = null)
{
parent::initialize($request, $args);

$builder = UserGroup::withContextIds([$request->getContext()->getId()]);
$stageId = $this->getAuthorizedContextObject(Application::ASSOC_TYPE_WORKFLOW_STAGE);
$userGroups = Repo::userGroup()->getUserGroupsByStage(
$request->getContext()->getId(),
$stageId
);
if ($stageId) {
$builder->withStageIds([$stageId]);
}
$userGroups = $builder->get();

$this->_userGroupOptions = [];
foreach ($userGroups as $userGroup) {
$this->_userGroupOptions[$userGroup->id] = $userGroup->getLocalizedData('name');
Expand Down

0 comments on commit 6a34a25

Please sign in to comment.