当前位置: 首页>>代码示例>>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;未经允许,请勿转载。