CRM-18701 minor, tangental tidy up
authoreileen <emcnaughton@wikimedia.org>
Mon, 6 Jun 2016 21:55:44 +0000 (15:55 -0600)
committereileen <emcnaughton@wikimedia.org>
Tue, 7 Jun 2016 18:02:58 +0000 (12:02 -0600)
CRM/Event/Form/Participant.php

index 10a7db09ed45f764c179df8e5fd15465768f0912..8de80161bfd0a1bd260119f465c8928406dc82cf 100644 (file)
@@ -1045,11 +1045,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
     }
 
     // Retrieve the name and email of the current user - this will be the FROM for the receipt email
-    $session = CRM_Core_Session::singleton();
-    $userID = $session->get('userID');
-    list($userName,
-      $userEmail
-      ) = CRM_Contact_BAO_Contact_Location::getEmailDetails($userID);
+    $userName = CRM_Core_Session::singleton()->getLoggedInContactDisplayName();
 
     if ($this->_contactId) {
       list($this->_contributorDisplayName, $this->_contributorEmail, $this->_toDoNotEmail) = CRM_Contact_BAO_Contact::getContactDetails($this->_contactId);