/**
  * @param array $ids
  *  bulk Map users to rtbiz contacts
  *
  * @return int count
  */
 function export_biz_contacts($ids)
 {
     $count = 0;
     foreach ($ids as $id) {
         $possts = rtbiz_get_contact_for_wp_user($id);
         if (empty($possts)) {
             $postid = rtbiz_export_contact($id);
             if ($postid) {
                 $count = $count + 1;
             }
         }
     }
     return $count;
 }
Example #2
0
function rtbiz_get_user_team($user_ID)
{
    $user_contacts = rtbiz_get_contact_for_wp_user($user_ID);
    $ug_terms = array();
    if (!empty($user_contacts)) {
        foreach ($user_contacts as $contact) {
            $temp_terms = wp_get_post_terms($contact->ID, Rtbiz_Teams::$slug);
            $ug_terms = array_merge($ug_terms, $temp_terms);
        }
    }
    return $ug_terms;
}