ILIAS  release_8 Revision v8.24
class.ilMailAutoCompleteBuddyRecipientsProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
29 protected function getFromPart(): string
30 {
31 $joins = [];
32
33 $joins[] = implode(' ', [
34 'INNER JOIN buddylist',
35 'ON ((',
36 'buddylist.usr_id = usr_data.usr_id AND',
37 'buddylist.buddy_usr_id = ' . $this->db->quote($this->user_id, 'integer'),
38 ') OR (',
39 'buddylist.buddy_usr_id = usr_data.usr_id AND',
40 'buddylist.usr_id = ' . $this->db->quote($this->user_id, 'integer'),
41 '))',
42 ]);
43
44 $joins[] = implode(' ', [
45 'LEFT JOIN usr_pref profpref',
46 'ON profpref.usr_id = usr_data.usr_id',
47 'AND profpref.keyword = ' . $this->db->quote('public_profile', 'text'),
48 ]);
49
50 $joins[] = implode(' ', [
51 'LEFT JOIN usr_pref pubemail',
52 'ON pubemail.usr_id = usr_data.usr_id',
53 'AND pubemail.keyword = ' . $this->db->quote('public_email', 'text'),
54 ]);
55
56 return 'usr_data ' . implode(' ', $joins);
57 }
58}
Class ilMailAutoCompleteUserProvider.