Skip to content

Commit

Permalink
Merge pull request #11517 from nanaya/reset-null-username
Browse files Browse the repository at this point in the history
Check for null username parameter in password reset
  • Loading branch information
peppy authored Sep 29, 2024
2 parents dcfce28 + 29e8ae6 commit 83816db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Libraries/User/PasswordResetData.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ private function __construct(
$this->cacheKey = static::cacheKey($this->user, $username);
}

public static function create(?User $user, string $username): ?string
public static function create(?User $user, ?string $username): ?string
{
if ($user === null) {
if ($user === null || $username === null) {
return osu_trans('password_reset.error.user_not_found');
}

Expand Down

0 comments on commit 83816db

Please sign in to comment.