/** * Initializes the connecting parameters. * The actual connect happens with $this->ldap->bind() * * @param ConnectionInterface $connection * * @throws Exceptions\ConnectionException */ protected function connect(ConnectionInterface $connection) { $this->ldap->connect(); $this->ldap->option(LDAP_OPT_PROTOCOL_VERSION, $connection::PROTOCOL); $this->ldap->option(LDAP_OPT_REFERRALS, $connection::REFERRALS); $this->ldap->option(LDAP_OPT_TIMELIMIT, $connection::TIMELIMIT); $this->ldap->option(LDAP_OPT_NETWORK_TIMEOUT, $connection::TIMELIMIT); // For debug purposes only! // $this->ldap->option(LDAP_OPT_DEBUG_LEVEL, 7); $this->ldap->bind($this->admin_user, $this->admin_pass); }