public function SimpleLdapUser::authenticate in Simple LDAP 7
Same name and namespace in other branches
- 7.2 simple_ldap_user/SimpleLdapUser.class.php \SimpleLdapUser::authenticate()
Authenticates this user with the given password.
Parameters
string $password: The password to use for authentication.
Return value
boolean TRUE on success, FALSE on failure
File
- simple_ldap_user/
SimpleLdapUser.class.php, line 197 - Class defining a simple LDAP user.
Class
- SimpleLdapUser
- @file Class defining a simple LDAP user.
Code
public function authenticate($password) {
if ($this->exists) {
$auth = $this->server
->bind($this->dn, $password);
return $auth;
}
return FALSE;
}