X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FMerge.php;h=8f7d48535f4f6a77bbda9dff2caf2ef1476bf331;hb=d076584a95ac0d5421a991bdd24807a36b235e58;hp=ba9cfce432262c099f83075baf0f8e4bb354f569;hpb=d9e43fc964ece80da0326afc941c2fc130ff117b;p=civicrm-core.git diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index ba9cfce432..8f7d48535f 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -1,7 +1,7 @@ _cid); $mainUser = NULL; if ($mainUfId) { - // d6 compatible - if ($config->userSystem->is_drupal == '1') { - $mainUser = user_load($mainUfId); - } - elseif ($config->userFramework == 'Joomla') { - $mainUser = JFactory::getUser($mainUfId); - } - + $mainUser = $config->userSystem->getUser($this->_cid); $this->assign('mainUfId', $mainUfId); - $this->assign('mainUfName', $mainUser ? $mainUser->name : NULL); + $this->assign('mainUfName', $mainUser ? $mainUser['name'] : NULL); } $flipParams = array_merge($urlParams, ['action' => 'update', 'cid' => $this->_oid, 'oid' => $this->_cid]); if (!$flip) { @@ -164,16 +157,9 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $otherUser = NULL; if ($otherUfId) { - // d6 compatible - if ($config->userSystem->is_drupal == '1') { - $otherUser = user_load($otherUfId); - } - elseif ($config->userFramework == 'Joomla') { - $otherUser = JFactory::getUser($otherUfId); - } - + $otherUser = $config->userSystem->getUser($this->_oid); $this->assign('otherUfId', $otherUfId); - $this->assign('otherUfName', $otherUser ? $otherUser->name : NULL); + $this->assign('otherUfName', $otherUser ? $otherUser['name'] : NULL); } $cmsUser = ($mainUfId && $otherUfId) ? TRUE : FALSE;