Skip to content

Instantly share code, notes, and snippets.

@rlucia
Created July 1, 2014 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlucia/9d28303235f32cdeb73a to your computer and use it in GitHub Desktop.
Save rlucia/9d28303235f32cdeb73a to your computer and use it in GitHub Desktop.
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