From 31ac2b485f69362a66e6a47694c771b62245203b Mon Sep 17 00:00:00 2001 From: AVINASH GUSAIN Date: Tue, 21 Jan 2025 14:06:51 +0000 Subject: [PATCH] Revert "Merge branch 'dev/fix-verify-mail' into 'main'" This reverts merge request !73 --- lib/Service/RecoveryEmailService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Service/RecoveryEmailService.php b/lib/Service/RecoveryEmailService.php index 8ac6013..74a4f61 100644 --- a/lib/Service/RecoveryEmailService.php +++ b/lib/Service/RecoveryEmailService.php @@ -121,9 +121,6 @@ class RecoveryEmailService { return true; } public function validateRecoveryEmail(string $recoveryEmail, string $username = '', string $language = 'en'): bool { - if (empty($recoveryEmail)) { - return true; - } // Fetch user email if username is provided $email = $this->getUserEmail($username); @@ -158,6 +155,9 @@ class RecoveryEmailService { } private function enforceBasicRecoveryEmailRules(string $recoveryEmail, string $username, string $email, IL10N $l): void { + if (empty($recoveryEmail)) { + return; + } if (!$this->isValidEmailFormat($recoveryEmail)) { $this->logger->info("User $username's requested recovery email does not match email format"); -- GitLab