Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18711

bug in kernel/user/ezuseroperationcollection.php

    XMLWordPrintable

Details

    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

      Attachments

        Activity

          People

            ls ls
            joc@ez.no joc@ez.no
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: