Code comment
This commit is contained in:
parent
6480425130
commit
1b336456ce
@ -292,12 +292,12 @@ class Ldap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simply closes the connection set up earlier.
|
* Simply closes the connection set up earlier. Returns true if OK, false if there was an error.
|
||||||
* Returns true if OK, false if there was an error.
|
* This method seems a duplicate/alias of unbind().
|
||||||
*
|
*
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
|
* @see unbind()
|
||||||
*/
|
*/
|
||||||
public function close()
|
public function close()
|
||||||
{
|
{
|
||||||
@ -349,16 +349,21 @@ class Ldap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unbind du serveur ldap.
|
* Unbind of LDAP server (close connection).
|
||||||
*
|
*
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
|
* @see close()
|
||||||
*/
|
*/
|
||||||
public function unbind()
|
public function unbind()
|
||||||
{
|
{
|
||||||
if (!$this->result = @ldap_unbind($this->connection)) {
|
$this->result = true;
|
||||||
return false;
|
if ($this->connection) {
|
||||||
} else {
|
$this->result = @ldap_unbind($this->connection);
|
||||||
|
}
|
||||||
|
if ($this->result) {
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user