Merge remote-tracking branch 'upstream/4.3' into 4.3-master-2013-07-14-22-39-05
[civicrm-core.git] / CRM / Profile / Form / Edit.php
index a18db50c9eeacdeef43f650665309e4a1c5e551b..2c13ae4c60ba84a5081a4ecbc6890bb12aedcdf7 100644 (file)
@@ -309,9 +309,11 @@ SELECT module
 
     // this is special case when we create contact using Dialog box
     if ($this->_context == 'dialog') {
+      $displayName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_id, 'display_name');
       $sortName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_id, 'sort_name');
       $returnArray = array(
         'contactID' => $this->_id,
+        'displayName' => $displayName,
         'sortName' => $sortName,
         'newContactSuccess' => TRUE,
       );