ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMailAutoCompleteBuddyRecipientsProvider Class Reference

Class ilMailAutoCompleteBuddyRecipientsProvider. More...

+ Inheritance diagram for ilMailAutoCompleteBuddyRecipientsProvider:
+ Collaboration diagram for ilMailAutoCompleteBuddyRecipientsProvider:

Protected Member Functions

 getFromPart ()
 
- Protected Member Functions inherited from ilMailAutoCompleteUserProvider
 getSelectPart ()
 
 getFromPart ()
 
 getWherePart ($search_query)
 
 getOrderByPart ()
 
 getQueryConditionByFieldAndValue ($field, $a_str)
 
 getFields ()
 Get searchable fields. More...
 

Additional Inherited Members

- Public Member Functions inherited from ilMailAutoCompleteUserProvider
 __construct ($quoted_term, $term)
 
 valid ()
 "Valid" implementation of iterator interface More...
 
 current ()
 "Current" implementation of iterator interface More...
 
 key ()
 "Key" implementation of iterator interface More...
 
 rewind ()
 "Rewind "implementation of iterator interface More...
 
- Public Member Functions inherited from ilMailAutoCompleteRecipientProvider
 __construct ($quoted_term, $term)
 
 valid ()
 "Valid" implementation of iterator interface More...
 
 next ()
 "Next" implementation of iterator interface More...
 
 __destruct ()
 Destructor Free the result. More...
 
- Protected Attributes inherited from ilMailAutoCompleteRecipientProvider
 $db
 
 $res
 
 $data = array()
 
 $quoted_term = ''
 
 $term = ''
 
 $user_id = 0
 

Detailed Description

Member Function Documentation

◆ getFromPart()

ilMailAutoCompleteBuddyRecipientsProvider::getFromPart ( )
protected
Returns
string

Definition at line 12 of file class.ilMailAutoCompleteBuddyRecipientsProvider.php.

13  {
14  $joins = array();
15 
16  $joins[] = implode(' ', [
17  'INNER JOIN buddylist',
18  'ON ((',
19  'buddylist.usr_id = usr_data.usr_id AND',
20  'buddylist.buddy_usr_id = ' . $this->db->quote($this->user_id, 'integer'),
21  ') OR (',
22  'buddylist.buddy_usr_id = usr_data.usr_id AND',
23  'buddylist.usr_id = ' . $this->db->quote($this->user_id, 'integer'),
24  '))',
25  ]);
26 
27  $joins[] = implode(' ', [
28  'LEFT JOIN usr_pref profpref',
29  'ON profpref.usr_id = usr_data.usr_id',
30  'AND profpref.keyword = ' . $this->db->quote('public_profile', 'text'),
31  ]);
32 
33  $joins[] = implode(' ', [
34  'LEFT JOIN usr_pref pubemail',
35  'ON pubemail.usr_id = usr_data.usr_id',
36  'AND pubemail.keyword = ' . $this->db->quote('public_email', 'text'),
37  ]);
38 
39  if ($joins) {
40  return 'usr_data ' . implode(' ', $joins);
41  } else {
42  return 'usr_data ';
43  }
44  }

The documentation for this class was generated from the following file: