/**
  * Return value of specific IM. This function will return null if IM is not found
  *
  * @access public
  * @param ImType $im_type
  * @return string
  */
 function getImValue(ImType $im_type)
 {
     $im_value = ContactImValues::findOne(array("conditions" => "`contact_id` = " . $this->getId() . " AND `im_type_id` = " . $im_type->getId()));
     return $im_value instanceof ContactImValue && trim($im_value->getValue()) != '' ? $im_value->getValue() : null;
 }
Exemple #2
0
 /**
  * Return value of specific IM. This function will return null if IM is not found
  *
  * @access public
  * @param ImType $im_type
  * @return string
  */
 function getImValue(ImType $im_type)
 {
     $im_value = UserImValues::findById(array('user_id' => $this->getId(), 'im_type_id' => $im_type->getId()));
     return $im_value instanceof UserImValue && trim($im_value->getValue()) != '' ? $im_value->getValue() : null;
 }
 /**
 * Return value of specific IM. This function will return null if IM is not found
 *
 * @access public
 * @param ImType $im_type
 * @return string
 */
 function getImValue(ImType $im_type) {
   $im_value = ContactImValues::findById(array('contact_id' => $this->getId(), 'im_type_id' => $im_type->getId()));
   return $im_value instanceof ContactImValue && (trim($im_value->getValue()) <> '') ? $im_value->getValue() : null;
 } // getImValue