當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Contacts::get_searchbyemailid方法代碼示例

本文整理匯總了PHP中Contacts::get_searchbyemailid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Contacts::get_searchbyemailid方法的具體用法?PHP Contacts::get_searchbyemailid怎麽用?PHP Contacts::get_searchbyemailid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Contacts的用法示例。


在下文中一共展示了Contacts::get_searchbyemailid方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: SearchContactsByEmail

function SearchContactsByEmail($username, $password, $emailaddress)
{
    if (authentication($username, $password)) {
        require_once 'modules/Contacts/Contacts.php';
        $seed_contact = new Contacts();
        $output_list = array();
        $response = $seed_contact->get_searchbyemailid($username, $emailaddress);
        $contactList = $response['list'];
        // create a return array of names and email addresses.
        foreach ($contactList as $contact) {
            $output_list[] = array("id" => decode_html($contact[contactid]), "firstname" => decode_html($contact[firstname]), "lastname" => decode_html($contact[lastname]), "emailaddress" => decode_html($contact[email]), "accountname" => decode_html($contact[accountname]));
        }
        //to remove an erroneous compiler warning
        $seed_contact = $seed_contact;
        return $output_list;
    }
}
開發者ID:hardikk,項目名稱:HNH,代碼行數:17,代碼來源:thunderbirdplugin.php

示例2: SearchContactsByEmail

function SearchContactsByEmail($username, $session, $emailaddress)
{
    if (!validateSession($username, $session)) {
        return null;
    }
    require_once 'modules/Contacts/Contacts.php';
    require_once 'modules/Leads/Leads.php';
    require_once 'modules/Accounts/Accounts.php';
    $seed_contact = new Contacts();
    $output_list = array();
    //To avoid Blind SQL injection we are validating the Email address.
    if (filter_var($emailaddress, FILTER_VALIDATE_EMAIL) == false) {
        return null;
    }
    $response = $seed_contact->get_searchbyemailid($username, $emailaddress);
    $contactList = $response['list'];
    // create a return array of names and email addresses.
    foreach ($contactList as $contact) {
        $output_list[] = array("id" => $contact[contactid], "firstname" => decode_html($contact[firstname]), "lastname" => decode_html($contact[lastname]), "accountname" => decode_html($contact[accountname]), "emailaddress" => decode_html($contact[email]), "category" => "Contact");
    }
    // crm-now added Lead functionality
    $seed_lead = new Leads();
    $response2 = $seed_lead->get_searchbyemailid($username, $emailaddress);
    $leadList = $response2['list'];
    foreach ($leadList as $lead) {
        $output_list[] = array("id" => $lead[leadid], "firstname" => decode_html($lead[firstname]), "lastname" => decode_html($lead[lastname]), "accountname" => decode_html($lead[company]), "emailaddress" => decode_html($lead[email]), "category" => "Lead");
    }
    // crm-now added Accounts functionality
    $acc_lead = new Accounts();
    $response3 = $acc_lead->get_searchbyemailid($username, $emailaddress);
    $accList = $response3['list'];
    foreach ($accList as $acc) {
        $output_list[] = array("id" => $acc['accountid'], "firstname" => decode_html($acc['account_no']), "lastname" => decode_html($acc['accountname']), "accountname" => '', "emailaddress" => decode_html($acc['email1']), "category" => "Account");
    }
    // end crm-now
    //to remove an erroneous compiler warning
    $seed_contact = $seed_contact;
    $seed_lead = $seed_lead;
    $acc_lead = $acc_lead;
    return $output_list;
}
開發者ID:kduqi,項目名稱:corebos,代碼行數:41,代碼來源:vtigerolservice.php

示例3: SearchContactsByEmail

function SearchContactsByEmail($username, $session, $emailaddress)
{
    if (!validateSession($username, $session)) {
        return null;
    }
    require_once 'modules/Contacts/Contacts.php';
    $seed_contact = new Contacts();
    $output_list = array();
    //To avoid Blind SQL injection we are validating the Email address.
    if (filter_var($emailaddress, FILTER_VALIDATE_EMAIL) == false) {
        return null;
    }
    $response = $seed_contact->get_searchbyemailid($username, $emailaddress);
    $contactList = $response['list'];
    // create a return array of names and email addresses.
    foreach ($contactList as $contact) {
        $output_list[] = array("id" => $contact[contactid], "firstname" => decode_html($contact[firstname]), "lastname" => decode_html($contact[lastname]), "accountname" => decode_html($contact[accountname]), "emailaddress" => decode_html($contact[email]));
    }
    //to remove an erroneous compiler warning
    $seed_contact = $seed_contact;
    return $output_list;
}
開發者ID:jmangarret,項目名稱:vtigercrm,代碼行數:22,代碼來源:vtigerolservice.php


注:本文中的Contacts::get_searchbyemailid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。