Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Restore EmailRegistrationInfo in eZPublish kernel
diff --git a/ezpublish_legacy/kernel/user/ezuseroperationcollection.php b/ezpublish_legacy/kernel/user/ezuseroperationcollection
index 2714497..641e8af 100644
--- a/ezpublish_legacy/kernel/user/ezuseroperationcollection.php
+++ b/ezpublish_legacy/kernel/user/ezuseroperationcollection.php
@@ -215,6 +215,7 @@ class eZUserOperationCollection
eZDebugSetting::writeNotice( 'Sending approval notification to the user.' , 'kernel-user', 'user register' );
$user = eZUser::fetch( $userID );
$ini = eZINI::instance();
+ if( $ini->variable( 'UserSettings', 'EmailRegistrationInfo' ) !== 'disabled') {
// Send mail
$tpl = eZTemplate::factory();
$tpl->setVariable( 'user', $user );
@@ -241,6 +242,7 @@ class eZUserOperationCollection
$mail->setSubject( $subject );
$mail->setBody( $templateResult );
$mailResult = eZMailTransport::send( $mail );
+ }
return array( 'status' => eZModuleOperationInfo::STATUS_CONTINUE );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.