diff --git a/CRM/Contact/Form/Task/SMSCommon.php b/CRM/Contact/Form/Task/SMSCommon.php index 84a657f64ab29b73e28f41dd80eae773cc2628fb..e4604aa6d92b6daf988698842cc9b3a4684f15e4 100644 --- a/CRM/Contact/Form/Task/SMSCommon.php +++ b/CRM/Contact/Form/Task/SMSCommon.php @@ -156,19 +156,10 @@ class CRM_Contact_Form_Task_SMSCommon { } if (is_array($form->_contactIds) && !empty($form->_contactIds) && $toSetDefault) { - $returnProperties = [ - 'sort_name' => 1, - 'phone' => 1, - 'do_not_sms' => 1, - 'is_deceased' => 1, - 'display_name' => 1, - ]; - - list($form->_contactDetails) = CRM_Utils_Token::getTokenDetails($form->_contactIds, - $returnProperties, - FALSE, - FALSE - ); + $form->_contactDetails = civicrm_api3('Contact', 'get', [ + 'id' => ['IN' => $form->_contactIds], + 'return' => ['sort_name', 'phone', 'do_not_sms', 'is_deceased', 'display_name'], + ])['values']; // make a copy of all contact details $form->_allContactDetails = $form->_contactDetails;