API15:JLDAP/connect
From Joomla! Documentation
Description
Connect to server boolean True if successful public
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
connect()
Returns
boolean True if successful public
Defined in
libraries/joomla/client/ldap.php
Importing
jimport( 'joomla.client.ldap' );
Source Body
function connect()
{
if ($this->host == '') {
return false;
}
$this->_resource = @ ldap_connect($this->host, $this->port);
if ($this->_resource)
{
if ($this->use_ldapV3) {
if (!@ldap_set_option($this->_resource, LDAP_OPT_PROTOCOL_VERSION, 3)) {
return false;
}
}
if (!@ldap_set_option($this->_resource, LDAP_OPT_REFERRALS, intval($this->no_referrals))) {
return false;
}
if ($this->negotiate_tls) {
if (!@ldap_start_tls($this->_resource)) {
return false;
}
}
return true;
} else {
return false;
}
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples