}
// 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);