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

bug in kernel/user/ezuseroperationcollection.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 4.5.0
    • Fix Version/s: 4.6 Certification, 4.6.0alpha1
    • Component/s: Misc
    • Labels:
      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

        Attachments

          Activity

            People

            Assignee:
            ls Ɓukasz Serwatka
            Reporter:
            joc@ez.no J. J. Cavalleri
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: