Attempt to add a subscriber only when there is an email address

[MAILPOET-6188]
This commit is contained in:
Rostislav Wolny
2024-08-14 08:16:22 +02:00
committed by Pavel Dohnal
parent f022cc23fc
commit a046d4ab6f

View File

@@ -87,6 +87,7 @@ class Registration {
empty($errors->errors)
&& isset($_POST['mailpoet']['subscribe_on_register'])
&& (bool)$_POST['mailpoet']['subscribe_on_register'] === true
&& !empty($userEmail)
) {
$this->subscribeNewUser(
$userLogin,