diff --git a/auth-ldap/authentication.php b/auth-ldap/authentication.php index 2f93de8..186c3ad 100644 --- a/auth-ldap/authentication.php +++ b/auth-ldap/authentication.php @@ -63,6 +63,22 @@ class LDAPAuthentication { 'lookup' => '(&(objectClass=inetOrgPerson)({attr}={q}))', ), ), + // Zimbra LDAP is a bit different than standard ldap + 'zimbra' => array( + 'user' => array( + 'filter' => '(objectClass=zimbraAccount)', + 'first' => 'givenName', + 'last' => 'sn', + 'full' => array('displayName', 'cn'), + 'email' => 'mail', + 'phone' => 'telephoneNumber', + 'mobile' => 'mobile', + 'username' => 'uid', + 'dn' => 'uid={username},{search_base}', + 'search' => '(&(objectClass=zimbraAccount)(|(uid={q}*)(displayName={q}*)(cn={q}*)))', + 'lookup' => '(&(objectClass=zimbraAccount)({attr}={q}))', + ), + ), ); var $config; diff --git a/auth-ldap/config.php b/auth-ldap/config.php index 223c9d0..431be6d 100644 --- a/auth-ldap/config.php +++ b/auth-ldap/config.php @@ -104,6 +104,7 @@ function($self, $val) use ($__) { 'auto' => '— '.$__('Automatically Detect').' —', 'msad' => 'Microsoft® Active Directory', '2307' => 'Posix Account (rfc 2307)', + 'zimbra' => 'Zimbra', ), )),