diff --git a/app/Libraries/User/PasswordResetData.php b/app/Libraries/User/PasswordResetData.php index e881345f6c2..420f7d41984 100644 --- a/app/Libraries/User/PasswordResetData.php +++ b/app/Libraries/User/PasswordResetData.php @@ -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'); }