ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilMailAutoCompleteBuddyRecipientsProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  protected function getFromPart(): string
27  {
28  $joins = [];
29 
30  $joins[] = implode(' ', [
31  'INNER JOIN buddylist',
32  'ON ((',
33  'buddylist.usr_id = usr_data.usr_id AND',
34  'buddylist.buddy_usr_id = ' . $this->db->quote($this->user_id, 'integer'),
35  ') OR (',
36  'buddylist.buddy_usr_id = usr_data.usr_id AND',
37  'buddylist.usr_id = ' . $this->db->quote($this->user_id, 'integer'),
38  '))',
39  ]);
40 
41  $joins[] = implode(' ', [
42  'LEFT JOIN usr_pref profpref',
43  'ON profpref.usr_id = usr_data.usr_id',
44  'AND profpref.keyword = ' . $this->db->quote('public_profile', 'text'),
45  ]);
46 
47  $joins[] = implode(' ', [
48  'LEFT JOIN usr_pref pubemail',
49  'ON pubemail.usr_id = usr_data.usr_id',
50  'AND pubemail.keyword = ' . $this->db->quote('public_email', 'text'),
51  ]);
52 
53  return 'usr_data ' . implode(' ', $joins);
54  }
55 }
Class ilMailAutoCompleteUserProvider.