Comment 1 for bug 1073593

Revision history for this message
Brian LaVallee (b-lavallee) wrote :

// ==
//
// The v2.3.3 code was ONLY evaluating against Eventum Users.
// This is how I fixed the issue on my system.
//
if (!empty($email)) {
// don't send the email to the same person who sent it unless they want it

    if ($sender_usr_id != false) {
    // Check Eventum users preference
     $prefs = Prefs::get($sender_usr_id);
        if (!isset($prefs['receive_copy_of_own_action'][$prj_id])) {
         $prefs['receive_copy_of_own_action'][$prj_id] = 0;
        }
    }

    if (
 // Eventum User *OR* External Address
      (
      // Check Eventum User
       ($sender_usr_id != false) &&
          ($prefs['receive_copy_of_own_action'][$prj_id] == 0) &&
             (!empty($users[$i]["sub_usr_id"])) &&
             ($sender_usr_id == $users[$i]["sub_usr_id"])
            ) ||
            (
            // Check for External Addresses
             (strtolower(Mail_Helper::getEmailAddress($email)) == $sender_email)
            )
        ) {
   continue;
        }
    //}
     $emails[] = $email;
}

// ==