Difference between revisions of "JLDAP/connect"
From Joomla! Documentation
< API16:JLDAP
(New page: ===Description===
Connect to server boolean True if successful public
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JLDAP/connect|Edit Descripto...) |
m (preparing for archive only) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
− | |||
− | |||
− | |||
− | + | ||
+ | <! removed transcluded page call, red link never existed > | ||
===Syntax=== | ===Syntax=== | ||
Line 51: | Line 49: | ||
</source> | </source> | ||
− | + | ||
− | + | <! removed transcluded page call, red link never existed > | |
− | < | ||
− | |||
===Examples=== | ===Examples=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=connect | category=connect | ||
category=JLDAP | category=JLDAP | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API16]] |
Latest revision as of 20:51, 24 March 2017
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Connect to server boolean True if successful public
<! removed transcluded page call, red link never existed >
Syntax[edit]
connect()
Returns[edit]
boolean True if successful public
Defined in[edit]
libraries/joomla/client/ldap.php
Importing[edit]
jimport( 'joomla.client.ldap' );
Source Body[edit]
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 transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]