Skip to content

Commit

Permalink
Fix OAuth2 catalog login to not show the account menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed May 27, 2024
1 parent db269c4 commit 4b4bd69
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion module/VuFind/src/VuFind/Controller/OAuth2Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,13 @@ public function authorizeAction()

$userIdentifierField = $this->oauth2Config['Server']['userIdentifierField'] ?? 'id';
$patron = $this->catalogLogin();
$patronLoginView = is_array($patron) ? null : $patron;
if (is_array($patron)) {
$patronLoginView = $patron;
} else {
$patronLoginView = $this->forwardTo('MyResearch', 'CatalogLogin');
$patronLoginView->showMenu = false;
}

return $this->createViewModel(
compact('authRequest', 'user', 'patron', 'patronLoginView', 'userIdentifierField')
);
Expand Down

0 comments on commit 4b4bd69

Please sign in to comment.