Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.5.0
-
None
Description
In kernel/user/ezuseroperationcollection.php $mail object is used before it has been initialized.
static public function sendActivationEmail( $userID ) (...) if ( $sendUserMail ) { $templateResult = $tpl->fetch( 'design:user/registrationinfo.tpl' ); if ( $tpl->hasVariable( 'content_type' ) ) $mail->setContentType( $tpl->variable( 'content_type' ) ); // <------- used here $emailSender = $ini->variable( 'MailSettings', 'EmailSender' ); if ( $tpl->hasVariable( 'email_sender' ) ) $emailSender = $tpl->variable( 'email_sender' ); else if ( !$emailSender ) $emailSender = $ini->variable( 'MailSettings', 'AdminEmail' ); if ( $tpl->hasVariable( 'subject' ) ) $subject = $tpl->variable( 'subject' ); else $subject = ezpI18n::tr( 'kernel/user/register', 'Registration info' ); $mail = new eZMail(); <---- initialized here $mail->setSender( $emailSender ); $user = eZUser::fetch( $userID );
Steps to reproduce
send verification mail to user where email type or custom verify user type returned true