ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMailAutoCompleteBuddyRecipientsProvider.php
Go to the documentation of this file.
1<?php
2
19declare(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}