Difference between #7 and #8 of
How to use ldap in UserIdentity for authentication

Revision #8 has been created by Navarr on Dec 7, 2013, 1:51:25 AM with the memo:

Silence ldap_bind errors
« previous (#7)

Changes

Title unchanged

How to use ldap in UserIdentity for authentication

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Authentication, LDAP

Content changed

[...]
ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($connection, LDAP_OPT_REFERRALS, 0);

if($connection)
{
    // Note: in general it is bad to hide errors, however we're checking for an error below
 
$bind = @ldap_bind($connection, "uid={$this->username},ou={$options['ou']},{$dc_string}", $this->password);

if(!$bind) $this->errorCode = self::ERROR_PASSWORD_INVALID;
else $this->errorCode = self::ERROR_NONE;
}
return !$this->errorCode;
[...]
11 0
18 followers
Viewed: 90 234 times
Version: 1.1
Category: Tutorials
Written by: BeerSerc
Last updated by: Navarr
Created on: Jan 26, 2010
Last updated: 10 years ago
Update Article

Revisions

View all history