◆ current()
ilMailAutoCompleteUserProvider::current |
( |
| ) |
|
- Returns
- array{login: string, firstname: string, lastname:string}
Definition at line 26 of file class.ilMailAutoCompleteUserProvider.php.
29 'login' => $this->data[
'login'],
30 'firstname' => $this->data[
'firstname'],
31 'lastname' => $this->data[
'lastname'],
◆ getFields()
ilMailAutoCompleteUserProvider::getFields |
( |
| ) |
|
|
protected |
◆ getFromPart()
ilMailAutoCompleteUserProvider::getFromPart |
( |
| ) |
|
|
protected |
Definition at line 89 of file class.ilMailAutoCompleteUserProvider.php.
Referenced by rewind().
94 LEFT JOIN usr_pref profpref 95 ON profpref.usr_id = usr_data.usr_id 96 AND profpref.keyword = ' . $this->db->quote(
'public_profile',
'text');
99 LEFT JOIN usr_pref pubemail 100 ON pubemail.usr_id = usr_data.usr_id 101 AND pubemail.keyword = ' . $this->db->quote(
'public_email',
'text');
103 return 'usr_data ' . implode(
' ', $joins);
◆ getOrderByPart()
ilMailAutoCompleteUserProvider::getOrderByPart |
( |
| ) |
|
|
protected |
◆ getQueryConditionByFieldAndValue()
ilMailAutoCompleteUserProvider::getQueryConditionByFieldAndValue |
( |
string |
$field, |
|
|
|
$a_str |
|
) |
| |
|
protected |
◆ getSelectPart()
ilMailAutoCompleteUserProvider::getSelectPart |
( |
| ) |
|
|
protected |
Definition at line 60 of file class.ilMailAutoCompleteUserProvider.php.
Referenced by rewind().
65 '(CASE WHEN (firstname IS NOT NULL AND (profpref.value = %s OR profpref.value = %s)) THEN firstname ELSE \'\' END) firstname',
66 $this->db->quote(
'y',
'text'),
67 $this->db->quote(
'g',
'text')
70 '(CASE WHEN (lastname IS NOT NULL AND (profpref.value = %s OR profpref.value = %s)) THEN lastname ELSE \'\' END) lastname',
71 $this->db->quote(
'y',
'text'),
72 $this->db->quote(
'g',
'text')
75 '(CASE WHEN (email IS NOT NULL AND (profpref.value = %s OR profpref.value = %s) ' .
76 "AND pubemail.value = %s) THEN email ELSE '' END) email",
77 $this->db->quote(
'y',
'text'),
78 $this->db->quote(
'g',
'text'),
79 $this->db->quote(
'y',
'text')
83 $fields[] =
'profpref.value profile_value';
84 $fields[] =
'pubemail.value email_value';
86 return implode(
', ', $fields);
◆ getWherePart()
ilMailAutoCompleteUserProvider::getWherePart |
( |
string |
$search_query | ) |
|
|
protected |
Definition at line 106 of file class.ilMailAutoCompleteUserProvider.php.
References ANONYMOUS_USER_ID, getFields(), ilUserFilter\getInstance(), ilUserAccountSettings\getInstance(), and getQueryConditionByFieldAndValue().
Referenced by rewind().
108 $outer_conditions = [];
109 $outer_conditions[] =
'usr_data.usr_id != ' . $this->db->quote(
ANONYMOUS_USER_ID,
'integer');
110 $outer_conditions[] =
'usr_data.active != ' . $this->db->quote(0,
'integer');
112 $field_conditions = [];
116 if (
'email' === $field) {
121 $email_query[] = $field_condition;
122 $email_query[] =
'pubemail.value = ' . $this->db->quote(
'y',
'text');
123 $field_conditions[] =
'(' . implode(
' AND ', $email_query) .
')';
125 $field_conditions[] = $field_condition;
134 if ($field_conditions !== []) {
135 $fields =
'(' . implode(
' OR ', $field_conditions) .
')';
137 $field_conditions = [
'(' . implode(
' AND ', [
139 $this->db->in(
'profpref.value', [
'y',
'g'],
false,
'text'),
148 $outer_conditions[] = $this->db->in(
156 if ($field_conditions !== []) {
157 $outer_conditions[] =
'(' . implode(
' OR ', $field_conditions) .
')';
160 return implode(
' AND ', $outer_conditions);
getQueryConditionByFieldAndValue(string $field, $a_str)
◆ key()
ilMailAutoCompleteUserProvider::key |
( |
| ) |
|
◆ rewind()
ilMailAutoCompleteUserProvider::rewind |
( |
| ) |
|
Definition at line 40 of file class.ilMailAutoCompleteUserProvider.php.
References getFromPart(), getOrderByPart(), getSelectPart(), getWherePart(), and null.
42 if ($this->res !==
null) {
43 $this->db->free($this->res);
50 $query = implode(
' ', [
51 'SELECT ' . $select_part,
53 $where_part !==
'' ?
'WHERE ' . $where_part :
'',
54 $order_by_part !==
'' ?
'ORDER BY ' . $order_by_part :
'',
57 $this->res = $this->db->query($query);
getWherePart(string $search_query)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
The documentation for this class was generated from the following file: