ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilMailAutoCompleteBuddyRecipientsProvider.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2/* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
12 protected function getFromPart()
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 }
45}
An exception for terminatinating execution or to throw for unit testing.
Class ilMailAutoCompleteUserProvider.