2 if(!defined('sugarEntry'))define('sugarEntry', true);
3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
39 // the types/methods defined in this file are deprecated -- please see SoapSugarUsers.php, SoapPortalUsers.php, SoapStudio.php, etc.
41 $server->wsdl->addComplexType(
48 'email_address' => array('name'=>'email_address','type'=>'xsd:string'),
49 'name1' => array('name'=>'name1','type'=>'xsd:string'),
50 'name2' => array('name'=>'name2','type'=>'xsd:string'),
51 'association' => array('name'=>'association','type'=>'xsd:string'),
52 'id' => array('name'=>'id','type'=>'xsd:string'),
53 'msi_id' => array('name'=>'id','type'=>'xsd:string'),
54 'type' => array('name'=>'type','type'=>'xsd:string'),
58 $server->wsdl->addComplexType(
59 'contact_detail_array',
66 array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:contact_detail[]')
71 $server->wsdl->addComplexType(
78 'email_address' => array('name'=>'email_address','type'=>'xsd:string'),
79 'user_name' => array('name'=>'user_name', 'type'=>'xsd:string'),
80 'first_name' => array('name'=>'first_name','type'=>'xsd:string'),
81 'last_name' => array('name'=>'last_name','type'=>'xsd:string'),
82 'department' => array('name'=>'department','type'=>'xsd:string'),
83 'id' => array('name'=>'id','type'=>'xsd:string'),
84 'title' => array('name'=>'title','type'=>'xsd:string'),
88 $server->wsdl->addComplexType(
96 array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:user_detail[]')
104 array('user_name'=>'xsd:string','password'=>'xsd:string'),
105 array('return'=>'xsd:string'),
110 array('user_name'=>'xsd:string'),
111 array('return'=>'xsd:string'),
116 array('user_name'=>'xsd:string','password'=>'xsd:string', 'email_address'=>'xsd:string'),
117 array('return'=>'tns:contact_detail_array'),
121 'get_contact_relationships',
122 array('user_name'=>'xsd:string','password'=>'xsd:string', 'id'=>'xsd:string'),
123 array('return'=>'tns:contact_detail_array'),
128 array('user_name'=>'xsd:string','password'=>'xsd:string'),
129 array('return'=>'tns:user_detail_array'),
134 array('user_name'=>'xsd:string','password'=>'xsd:string', 'name'=>'xsd:string'),
135 array('return'=>'tns:contact_detail_array'),
140 array('user_name'=>'xsd:string','password'=>'xsd:string','parent_id'=>'xsd:string', 'contact_ids'=>'xsd:string', 'date_sent'=>'xsd:date', 'email_subject'=>'xsd:string', 'email_body'=>'xsd:string'),
141 array('return'=>'xsd:string'),
146 array('user_name'=>'xsd:string','password'=>'xsd:string', 'first_name'=>'xsd:string', 'last_name'=>'xsd:string', 'email_address'=>'xsd:string'),
147 array('return'=>'xsd:string'),
151 array('user_name'=>'xsd:string','password'=>'xsd:string', 'first_name'=>'xsd:string', 'last_name'=>'xsd:string', 'email_address'=>'xsd:string'),
152 array('return'=>'xsd:string'),
156 array('user_name'=>'xsd:string','password'=>'xsd:string', 'name'=>'xsd:string', 'phone'=>'xsd:string', 'website'=>'xsd:string'),
157 array('return'=>'xsd:string'),
161 'create_opportunity',
162 array('user_name'=>'xsd:string','password'=>'xsd:string', 'name'=>'xsd:string', 'amount'=>'xsd:string'),
163 array('return'=>'xsd:string'),
168 array('user_name'=>'xsd:string','password'=>'xsd:string', 'name'=>'xsd:string'),
169 array('return'=>'xsd:string'),
172 * Create a new session. This method is required before calling any other functions.
174 * @param string $user_name -- the user name for the session
175 * @param string $password -- MD5 of user password
176 * @return "Success" if the session is created
177 * @return "Failed" if the session creation failed.
179 function create_session($user_name, $password)
181 if(validate_user($user_name, $password))
190 * End a session. This method will end the SOAP session.
192 * @param string $user_name -- the user name for the session
193 * @return "Success" if the session is destroyed
194 * @return "Failed" if the session destruction failed.
196 function end_session($user_name)
198 // get around optimizer warning
199 $user_name = $user_name;
204 * Validate the user session based on user name and password hash.
206 * @param string $user_name -- The user name to create a session for
207 * @param string $password -- The MD5 sum of the user's password
208 * @return true -- If the session is created
209 * @return false -- If the session is not created
211 function validate_user($user_name, $password){
212 global $server, $current_user, $sugar_config, $system_config;
214 $user->user_name = $user_name;
215 $system_config = new Administration();
216 $system_config->retrieveSettings('system');
217 $authController = new AuthenticationController((!empty($sugar_config['authenticationClass'])? $sugar_config['authenticationClass'] : 'SugarAuthenticate'));
218 // Check to see if the user name and password are consistent.
219 if($user->authenticate_user($password)){
220 // we also need to set the current_user.
221 $user->retrieve($user->id);
222 $current_user = $user;
225 }else if(function_exists('mcrypt_cbc')){
226 $password = decrypt_string($password);
227 if($authController->login($user_name, $password) && isset($_SESSION['authenticated_user_id'])){
228 $user->retrieve($_SESSION['authenticated_user_id']);
229 $current_user = $user;
234 $GLOBALS['log']->fatal("SECURITY: failed attempted login for $user_name using SOAP api");
235 $server->setError("Invalid username and/or password");
242 * Internal: When building a response to the plug-in for Microsoft Outlook, find
243 * all contacts that match the email address that was provided.
245 * @param array by ref $output_list -- The list of matching beans. New contacts that match
246 * the email address are appended to the $output_list
247 * @param string $email_address -- an email address to search for
248 * @param Contact $seed_contact -- A template SugarBean. This is a blank Contact
249 * @param ID $msi_id -- Index Count
251 function add_contacts_matching_email_address(&$output_list, $email_address, &$seed_contact, &$msi_id)
253 // escape the email address
254 $safe_email_address = addslashes($email_address);
255 global $current_user;
257 // Verify that the user has permission to see Contact list views
258 if(!$seed_contact->ACLAccess('ListView'))
263 $contactList = $seed_contact->emailAddress->getBeansByEmailAddress($safe_email_address);
264 // create a return array of names and email addresses.
265 foreach($contactList as $contact)
267 $output_list[] = Array("name1" => $contact->first_name,
268 "name2" => $contact->last_name,
269 "association" => $contact->account_name,
271 "id" => $contact->id,
273 "email_address" => $contact->email1);
275 $accounts = $contact->get_linked_beans('accounts','Account');
276 foreach($accounts as $account)
278 $output_list[] = get_account_array($account, $msi_id);
281 $opps = $contact->get_linked_beans('opportunities','Opportunity');
282 foreach($opps as $opp)
284 $output_list[] = get_opportunity_array($opp, $msi_id);
287 $cases = $contact->get_linked_beans('cases','aCase');
288 foreach($cases as $case)
290 $output_list[] = get_case_array($case, $msi_id);
293 $bugs = $contact->get_linked_beans('bugs','Bug');
294 foreach($bugs as $bug)
296 $output_list[] = get_bean_array($bug, $msi_id, 'Bug');
299 $projects = $contact->get_linked_beans('project','Project');
300 foreach($projects as $project)
302 $output_list[] = get_bean_array($project, $msi_id, 'Project');
305 $msi_id = $msi_id + 1;
309 * Internal: Add Leads that match the specified email address to the result array
311 * @param Array $output_list -- List of matching detail records
312 * @param String $email_address -- Email address
313 * @param Bean $seed_lead -- Seed Lead Bean
314 * @param int $msi_id -- output array offset.
316 function add_leads_matching_email_address(&$output_list, $email_address, &$seed_lead, &$msi_id)
318 $safe_email_address = addslashes($email_address);
319 if(!$seed_lead->ACLAccess('ListView')){
323 $leadList = $seed_lead->emailAddress->getBeansByEmailAddress($safe_email_address);
325 // create a return array of names and email addresses.
326 foreach($leadList as $lead)
328 $output_list[] = Array("name1" => $lead->first_name,
329 "name2" => $lead->last_name,
330 "association" => $lead->account_name,
334 "email_address" => $lead->email1);
336 $msi_id = $msi_id + 1;
340 * Return a list of modules related to the specifed contact record
342 * This function does not require a session be created first.
344 * @param string $user_name -- User name to authenticate with
345 * @param string $password -- MD5 of the user password
346 * @param string $id -- the id of the record
347 * @return contact detail array along with associated objects.
349 function get_contact_relationships($user_name, $password, $id)
351 if(!validate_user($user_name, $password)){
355 $seed_contact = new Contact();
356 // Verify that the user has permission to see Contact list views
357 if(!$seed_contact->ACLAccess('ListView'))
363 $seed_contact->retrieve($id);
365 $output_list[] = Array("name1" => $seed_contact->first_name,
366 "name2" => $seed_contact->last_name,
367 "association" => $seed_contact->account_name,
369 "id" => $seed_contact->id,
371 "email_address" => $seed_contact->email1);
373 $accounts = $seed_contact->get_linked_beans('accounts','Account');
374 foreach($accounts as $account)
376 $output_list[] = get_account_array($account, $msi_id);
379 $opps = $seed_contact->get_linked_beans('opportunities','Opportunity');
380 foreach($opps as $opp)
382 $output_list[] = get_opportunity_array($opp, $msi_id);
385 $cases = $seed_contact->get_linked_beans('cases','aCase');
386 foreach($cases as $case)
388 $output_list[] = get_case_array($case, $msi_id);
391 $bugs = $seed_contact->get_linked_beans('bugs','Bug');
392 foreach($bugs as $bug)
394 $output_list[] = get_bean_array($bug, $msi_id, 'Bug');
397 $projects = $seed_contact->get_linked_beans('project','Project');
398 foreach($projects as $project)
400 $output_list[] = get_bean_array($project, $msi_id, 'Project');
405 // Define a global current user
406 $current_user = null;
409 * Return a list of contact and lead detail records based on a single email
410 * address or a list of email addresses separated by '; '.
412 * This function does not require a session be created first.
414 * @param string $user_name -- User name to authenticate with
415 * @param string $password -- MD5 of the user password
416 * @param string $email_address -- Single email address or '; ' separated list of email addresses (e.x "test@example.com; test2@example.com"
417 * @return contact detail array along with associated objects.
419 function contact_by_email($user_name, $password, $email_address)
421 if(!validate_user($user_name, $password)){
425 $seed_contact = new Contact();
426 $seed_lead = new Lead();
427 $output_list = Array();
428 $email_address_list = explode("; ", $email_address);
430 // remove duplicate email addresses
431 $non_duplicate_email_address_list = Array();
432 foreach( $email_address_list as $single_address)
434 // Check to see if the current address is a match of an existing address
435 $found_match = false;
436 foreach( $non_duplicate_email_address_list as $non_dupe_single)
438 if(strtolower($single_address) == $non_dupe_single)
445 if($found_match == false)
447 $non_duplicate_email_address_list[] = strtolower($single_address);
451 // now copy over the non-duplicated list as the original list.
452 $email_address_list =$non_duplicate_email_address_list;
457 foreach( $email_address_list as $single_address)
459 // verify that contacts can be listed
460 if($seed_contact->ACLAccess('ListView')){
461 add_contacts_matching_email_address($output_list, $single_address, $seed_contact, $msi_id);
463 // verify that leads can be listed
464 if($seed_lead->ACLAccess('ListView')){
465 add_leads_matching_email_address($output_list, $single_address, $seed_lead, $msi_id);
473 * Internal: convert a bean into an array
475 * @param Bean $bean -- The bean to convert
476 * @param int $msi_id -- Russult array index
477 * @return An associated array containing the detail fields.
479 function get_contact_array($contact, $msi_id = '0'){
480 $contact->emailAddress->handleLegacyRetrieve($contact);
481 return Array("name1" => $contact->first_name,
482 "name2" => $contact->last_name,
483 "association" => $contact->account_name,
485 "id" => $contact->id,
487 "email_address" => $contact->email1);
492 * Internal: Convert a user into an array
494 * @param User $user -- The user to convert
495 * @return An associated array containing the detail fields.
497 function get_user_list_array($user) {
498 return Array('email_address' => $user->email1,
499 'user_name' => $user->user_name,
500 'first_name' => $user->first_name,
501 'last_name' => $user->last_name,
502 'department' => $user->department,
504 'title' => $user->title);
508 * Get a full user list.
510 * This function does not require a session be created first.
512 * @param string $user -- user name for validation
513 * @param password $password -- MD5 hash of the user password for validation
514 * @return User Array -- An array of user detail records
516 function user_list($user, $password) {
517 if(!validate_user($user, $password)){
521 $seed_user = new User();
522 $output_list = Array();
523 if(!$seed_user->ACLAccess('ListView')){
526 $userList = $seed_user->get_full_list();
529 foreach($userList as $user) {
530 $output_list[] = get_user_list_array($user);
537 * Internal: Search for contacts based on the specified name and where clause.
538 * Currently only the name is used.
540 * @param string $name -- Name to search for.
541 * @param string $where -- Where clause defaults to ''
542 * @param int $msi_id -- Response array index
543 * @return array -- Resturns a list of contacts that have the provided name.
545 function contact_by_search($name, $where = '', $msi_id = '0')
547 $seed_contact = new Contact();
549 $where = $seed_contact->build_generic_where_clause($name);
551 if(!$seed_contact->ACLAccess('ListView')){
554 $response = $seed_contact->get_list("last_name, first_name", $where, 0);
555 $contactList = $response['list'];
557 $output_list = Array();
559 // create a return array of names and email addresses.
560 foreach($contactList as $contact)
562 $output_list[] = get_contact_array($contact, $msi_id);
567 * Internal: convert a bean into an array
569 * @param Bean $bean -- The bean to convert
570 * @param int $msi_id -- Russult array index
571 * @return An associated array containing the detail fields.
573 function get_lead_array($lead, $msi_id = '0'){
574 $lead->emailAddress->handleLegacyRetrieve($lead);
575 return Array("name1" => $lead->first_name,
576 "name2" => $lead->last_name,
577 "association" => $lead->account_name,
581 "email_address" => $lead->email1);
584 function lead_by_search($name, $where = '', $msi_id = '0')
586 $seed_lead = new Lead();
588 $where = $seed_lead->build_generic_where_clause($name);
590 if(!$seed_lead->ACLAccess('ListView')){
593 $response = $seed_lead->get_list("last_name, first_name", $where, 0);
594 $lead_list = $response['list'];
596 $output_list = Array();
598 // create a return array of names and email addresses.
599 foreach($lead_list as $lead)
601 $output_list[] = get_lead_array($lead, $msi_id);
606 * Internal: convert a bean into an array
608 * @param Bean $bean -- The bean to convert
609 * @param int $msi_id -- Russult array index
610 * @return An associated array containing the detail fields.
612 function get_account_array($account, $msi_id){
613 return Array("name1" => '',
614 "name2" => $account->name,
615 "association" => $account->billing_address_city,
617 "id" => $account->id,
619 "email_address" => $account->email1);
622 function account_by_search($name, $where = '', $msi_id = '0')
624 $seed_account = new Account();
625 if(!$seed_account->ACLAccess('ListView')){
629 $where = $seed_account->build_generic_where_clause($name);
631 $response = $seed_account->get_list("name", $where, 0);
632 $accountList = $response['list'];
634 $output_list = Array();
636 // create a return array of names and email addresses.
637 foreach($accountList as $account)
639 $output_list[] = get_account_array($account, $msi_id);
645 * Internal: convert a bean into an array
647 * @param Bean $bean -- The bean to convert
648 * @param int $msi_id -- Russult array index
649 * @return An associated array containing the detail fields.
651 function get_opportunity_array($value, $msi_id = '0'){
652 return Array("name1" => '',
653 "name2" => $value->name,
654 "association" => $value->account_name,
655 "type" => 'Opportunity',
658 "email_address" => '');
662 function opportunity_by_search($name, $where = '', $msi_id = '0')
664 $seed = new Opportunity();
665 if(!$seed->ACLAccess('ListView')){
669 $where = $seed->build_generic_where_clause($name);
671 $response = $seed->get_list("name", $where, 0);
672 $list = $response['list'];
674 $output_list = Array();
676 // create a return array of names and email addresses.
677 foreach($list as $value)
679 $output_list[] = get_opportunity_array($value, $msi_id);
685 * Internal: convert a bean into an array
687 * @param Bean $bean -- The bean to convert
688 * @param int $msi_id -- Russult array index
689 * @return An associated array containing the detail fields.
691 function get_bean_array($value, $msi_id, $type){
692 return Array("name1" => '',
693 "name2" => $value->get_summary_text(),
698 "email_address" => '');
702 * Internal: convert a bean into an array
704 * @param Bean $bean -- The bean to convert
705 * @param int $msi_id -- Russult array index
706 * @return An associated array containing the detail fields.
708 function get_case_array($value, $msi_id){
709 return Array("name1" => '',
710 "name2" => $value->get_summary_text(),
711 "association" => $value->account_name,
715 "email_address" => '');
719 function bug_by_search($name, $where = '', $msi_id='0')
722 if(!$seed->ACLAccess('ListView')){
726 $where = $seed->build_generic_where_clause($name);
728 $response = $seed->get_list("name", $where, 0);
729 $list = $response['list'];
731 $output_list = Array();
733 // create a return array of names and email addresses.
734 foreach($list as $value)
736 $output_list[] = get_bean_array($value, $msi_id, 'Bug');
741 function case_by_search($name, $where = '', $msi_id='0')
744 if(!$seed->ACLAccess('ListView')){
748 $where = $seed->build_generic_where_clause($name);
750 $response = $seed->get_list("name", $where, 0);
751 $list = $response['list'];
753 $output_list = Array();
755 // create a return array of names and email addresses.
756 foreach($list as $value)
758 $output_list[] = get_case_array($value, $msi_id);
763 * Record and email message and associated it with the specified parent bean and contact ids.
765 * This function does not require a session be created first.
767 * @param string $user_name -- Name of the user to authenticate
768 * @param string $password -- MD5 hash of the user password for authentication
769 * @param id $parent_id -- [optional] The parent record to link the email to.
770 * @param unknown_type $contact_ids
771 * @param string $date_sent -- Date/time the email was sent in Visual Basic Date format. (e.g. '7/22/2004 9:36:31 AM')
772 * @param string $email_subject -- The subject of the email
773 * @param string $email_body -- The body of the email
774 * @return "Invalid username and/or password"
775 * @return -1 If the authenticated user does not have ACL access to save Email.
777 function track_email($user_name, $password,$parent_id, $contact_ids, $date_sent, $email_subject, $email_body)
779 if(!validate_user($user_name, $password)){
780 return "Invalid username and/or password";
782 global $current_user;
784 $GLOBALS['log']->info("In track email: username: $user_name contacts: $contact_ids date_sent: $date_sent");
786 // translate date sent from VB format 7/22/2004 9:36:31 AM
787 // to yyyy-mm-dd 9:36:31 AM
789 $date_sent = preg_replace("@([0-9]*)/([0-9]*)/([0-9]*)( .*$)@", "\\3-\\1-\\2\\4", $date_sent);
792 $seed_user = new User();
794 $user_id = $seed_user->retrieve_user_id($user_name);
795 $seed_user->retrieve($user_id);
796 $current_user = $seed_user;
799 $email = new Email();
800 if(!$email->ACLAccess('Save')){
803 $email->description = $email_body;
804 $email->name = $email_subject;
805 $email->user_id = $user_id;
806 $email->assigned_user_id = $user_id;
807 $email->assigned_user_name = $user_name;
808 $email->date_start = $date_sent;
810 // Save one copy of the email message
811 $parent_id_list = explode(";", $parent_id);
812 $parent_id = explode(':', $parent_id_list[0]);
814 // Having a parent object is optional. If it is set, then associate it.
815 if(isset($parent_id[0]) && isset($parent_id[1]))
817 $email->parent_type = $parent_id[0];
818 $email->parent_id = $parent_id[1];
822 // for each contact, add a link between the contact and the email message
823 $id_list = explode(";", $contact_ids);
825 foreach( $id_list as $id)
828 $email->set_emails_contact_invitee_relationship($email->id, $id);
834 function create_contact($user_name,$password, $first_name, $last_name, $email_address)
836 if(!validate_user($user_name, $password)){
841 $seed_user = new User();
842 $user_id = $seed_user->retrieve_user_id($user_name);
843 $seed_user->retrieve($user_id);
846 $contact = new Contact();
847 if(!$contact->ACLAccess('Save')){
850 $contact->first_name = $first_name;
851 $contact->last_name = $last_name;
852 $contact->email1 = $email_address;
853 $contact->assigned_user_id = $user_id;
854 $contact->assigned_user_name = $user_name;
855 return $contact->save();
857 function create_lead($user_name,$password, $first_name, $last_name, $email_address)
859 if(!validate_user($user_name, $password)){
863 //todo make the activity body not be html encoded
866 $seed_user = new User();
867 $user_id = $seed_user->retrieve_user_id($user_name);
871 if(!$lead->ACLAccess('Save')){
874 $lead->first_name = $first_name;
875 $lead->last_name = $last_name;
876 $lead->email1 = $email_address;
877 $lead->assigned_user_id = $user_id;
878 $lead->assigned_user_name = $user_name;
879 return $lead->save();
881 function create_account($user_name,$password, $name, $phone, $website)
883 if(!validate_user($user_name, $password)){
887 //todo make the activity body not be html encoded
890 $seed_user = new User();
891 $user_id = $seed_user->retrieve_user_id($user_name);
892 $account = new Account();
893 if(!$account->ACLAccess('Save')){
896 $account->name = $name;
897 $account->phone_office = $phone;
898 $account->website = $website;
899 $account->assigned_user_id = $user_id;
900 $account->assigned_user_name = $user_name;
905 function create_case($user_name,$password, $name)
907 if(!validate_user($user_name, $password)){
911 //todo make the activity body not be html encoded
914 $seed_user = new User();
915 $user_id = $seed_user->retrieve_user_id($user_name);
917 if(!$case->ACLAccess('Save')){
920 $case->assigned_user_id = $user_id;
921 $case->assigned_user_name = $user_name;
923 return $case->save();
925 function create_opportunity($user_name,$password, $name, $amount)
927 if(!validate_user($user_name, $password)){
932 $seed_user = new User();
933 $user_id = $seed_user->retrieve_user_id($user_name);
934 $opp = new Opportunity();
935 if(!$opp->ACLAccess('Save')){
939 $opp->amount = $amount;
940 $opp->assigned_user_id = $user_id;
941 $opp->assigned_user_name = $user_name;
945 function search($user_name, $password,$name){
946 if(!validate_user($user_name, $password)){
949 $name_list = explode("; ", $name);
951 foreach( $name_list as $single_name)
953 $list = array_merge($list, contact_by_search($single_name));
954 $list = array_merge($list, lead_by_search($single_name));
955 $list = array_merge($list, account_by_search($single_name));
956 $list = array_merge($list, case_by_search($single_name));
957 $list = array_merge($list, opportunity_by_search($single_name));
958 $list = array_merge($list, bug_by_search($single_name));