1
0

Add support for a username/password when calling ldap_bind()

This commit is contained in:
Bharat Mediratta 2010-07-20 09:33:04 -07:00
parent f9536374c8
commit 9f7907f9cb
2 changed files with 4 additions and 2 deletions

View File

@ -40,6 +40,8 @@ $config["ldap"] = array(
"admins" => array("mediratta", "martinm"),
"url" => "ldaps://ldap.corp.google.com/",
"group_domain" => "ou=Posix,ou=Groups,dc=google,dc=com",
"user_domain" => "ou=People,dc=google,dc=com"
"user_domain" => "ou=People,dc=google,dc=com",
"bind_rdn" => NULL,
"bind_password" => NULL,
)
);

View File

@ -31,7 +31,7 @@ class IdentityProvider_Ldap_Driver implements IdentityProvider_Driver {
self::$_params = $params;
self::$_connection = ldap_connect(self::$_params["url"]);
ldap_set_option(self::$_connection, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_bind(self::$_connection);
ldap_bind(self::$_connection, self::$_params["bind_rdn"], self::$_params["bind_password"]);
}
/**