ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilMailAutoCompleteBuddyRecipientsProvider.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Mail/classes/class.ilMailAutoCompleteUserProvider.php';
5
10{
14 protected function getFromPart()
15 {
16 $joins = array();
17
18 $joins[] = '
19 INNER JOIN buddylist
20 ON (
21 (buddylist.usr_id = usr_data.usr_id AND buddylist.buddy_usr_id = ' . $this->db->quote($this->user_id, 'integer') . ') OR
22 (buddylist.buddy_usr_id = usr_data.usr_id AND buddylist.usr_id = ' . $this->db->quote($this->user_id, 'integer') . ')
23 )';
24
25 $joins[] = '
26 LEFT JOIN usr_pref profpref
27 ON profpref.usr_id = usr_data.usr_id
28 AND profpref.keyword = ' . $this->db->quote('public_profile', 'text');
29
30 $joins[] = '
31 LEFT JOIN usr_pref pubemail
32 ON pubemail.usr_id = usr_data.usr_id
33 AND pubemail.keyword = ' . $this->db->quote('public_email', 'text');
34
35 if($joins)
36 {
37 return 'usr_data ' . implode(' ', $joins);
38 }
39 else
40 {
41 return 'usr_data ';
42 }
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
Class ilMailAutoCompleteUserProvider.