Skip to content

Commit

Permalink
Allow a null username to be passed to validate account
Browse files Browse the repository at this point in the history
  • Loading branch information
mdnoble73 committed Jan 6, 2025
1 parent d137ae4 commit 0a50ca3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/web/sys/UserAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,14 +666,14 @@ public static function loginWithAspen(User $user) {
* Validate the account information (username and password are correct).
* Returns the account, but does not set the global user variable.
*
* @param $username string
* @param $username ?string
* @param $password ?string
* @param $accountSource ?string The source of the user account if known or null to test all sources
* @param $parentAccount ?User The parent user if any
*
* @return User|false
*/
public static function validateAccount(string $username, ?string $password, ?string $accountSource = null, ?User $parentAccount = null) {
public static function validateAccount(?string $username, ?string $password, ?string $accountSource = null, ?User $parentAccount = null) {
if (array_key_exists($username . $password, UserAccount::$validatedAccounts)) {
return UserAccount::$validatedAccounts[$username . $password];
}
Expand Down

0 comments on commit 0a50ca3

Please sign in to comment.