public function bind($bindUser = null, $bindPass = null)
    {
        if (false === ldap_bind($this->ldapResource, $bindUser, $bindPass)) {
            throw new LdapClientException(
                sprintf(
                    'LDAP error: (%d) %s',
                    ldap_errno($this->ldapResource),
                    ldap_error($this->ldapResource)
                )
            );
        }
    }
public function bind($bindUser = null, $bindPass = null)
    {
        if (false === ldap_bind($this->ldapResource, $bindUser, $bindPass)) {
            throw new LdapClientException(
                sprintf(
                    'LDAP error: (%d) %s',
                    ldap_errno($this->ldapResource),
                    ldap_error($this->ldapResource)
                )
            );
        }
    }
public function bind ( $ bindUser = null , $ bindPass = null ) { if ( false === ldap_bind ( $ this -> ldapResource , $ bindUser , $ bindPass ) ) { throw new LdapClientException ( sprintf ( 'LDAP error: (%d) %s' , ldap_errno ( $ this -> ldapResource ) , ldap_error ( $ this -> ldapResource ) ) ) ; } }
Bind to an LDAP server.

@param string|null $bindUser you MUST use LdapClient::escapeDn on any user input used to contruct the DN!
@param string|null $bindPass

@return void
Bind to an LDAP server .