diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-10-07 08:33:24 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-10-07 08:33:24 +0000 |
| commit | 291f893df68c3fbf5388c71dcc08bf973480e235 (patch) | |
| tree | 15dc56ffc02dba999e68c1f5706da47defc82764 /roundcubemail/program/include/rcube_ldap.php | |
| parent | 8f3b78427bbc2d4b8e02931428f8fbe75a2a082b (diff) | |
- Make sure LDAP name fields aren't arrays (#1488108)
git-svn-id: https://svn.roundcube.net/trunk@5318 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_ldap.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_ldap.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php index 55c8c154f..a3f6dc56d 100644 --- a/roundcubemail/program/include/rcube_ldap.php +++ b/roundcubemail/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; |
