Skip to content

Commit

Permalink
Simplify.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed May 27, 2024
1 parent 1a2ad81 commit 6d7403e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions module/VuFind/src/VuFind/Controller/OAuth2Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,10 @@ public function authorizeAction()

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

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

0 comments on commit 6d7403e

Please sign in to comment.