diff options
author | alecpl <alec@alec.pl> | 2011-10-07 08:33:24 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-10-07 08:33:24 +0000 |
commit | b1f0846727331f58342e9cfdd02df03ea8f15181 (patch) | |
tree | b1669c03a72dab26aa8133371729144f69820489 /program/include | |
parent | 8fb04bee97aa6ae0b4a9faac0a4c0d2d27e1f64e (diff) |
- Make sure LDAP name fields aren't arrays (#1488108)
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube_ldap.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php index 55c8c154f..a3f6dc56d 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -72,7 +72,7 @@ class rcube_ldap extends rcube_addressbook function __construct($p, $debug=false, $mail_domain=NULL) { $this->prop = $p; - + if (isset($p['searchonly'])) $this->searchonly = $p['searchonly']; @@ -447,7 +447,7 @@ class rcube_ldap extends rcube_addressbook $this->result->searchonly = true; return $this->result; } - + // add general filter to query if (!empty($this->prop['filter']) && empty($this->filter)) { @@ -1031,6 +1031,11 @@ class rcube_ldap extends rcube_addressbook else $out[$rf] = $value; } + + // Make sure name fields aren't arrays (#1488108) + if (is_array($out[$rf]) && in_array($rf, array('name', 'surname', 'firstname', 'middlename', 'nickname'))) { + $out[$rf] = $out[$rf][0]; + } } return $out; |