Skip to content

Commit

Permalink
Fix ChoiceAuth getUsernamePolicy and getPasswordPolicy when not logge…
Browse files Browse the repository at this point in the history
…d in.

If an authentication strategy is not set, proxyAuthMethod returns false. This does not normally happen, but could be encountered e.g. when trying to refresh a password change form while the session has timed out or user has logged out in another browser window.
  • Loading branch information
EreMaijala committed Feb 3, 2025
1 parent d9d268d commit 26aada1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/Auth/ChoiceAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function supportsPasswordRecovery()
*/
public function getUsernamePolicy()
{
return $this->proxyAuthMethod('getUsernamePolicy', func_get_args());
return $this->proxyAuthMethod('getUsernamePolicy', func_get_args()) ?: [];
}

/**
Expand All @@ -322,7 +322,7 @@ public function getUsernamePolicy()
*/
public function getPasswordPolicy()
{
return $this->proxyAuthMethod('getPasswordPolicy', func_get_args());
return $this->proxyAuthMethod('getPasswordPolicy', func_get_args()) ?: [];
}

/**
Expand Down

0 comments on commit 26aada1

Please sign in to comment.