mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSerror : Added function isLdapError()
This commit is contained in:
parent
8e498f34fa
commit
3205bd4435
1 changed files with 15 additions and 0 deletions
|
@ -154,6 +154,21 @@ class LSerror {
|
||||||
private static function resetError() {
|
private static function resetError() {
|
||||||
unset ($_SESSION['LSerror']);
|
unset ($_SESSION['LSerror']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if is Net_LDAP2 error and display possible error message
|
||||||
|
*
|
||||||
|
* @param[in] $data mixed Data
|
||||||
|
*
|
||||||
|
* @retval boolean True if it's an error or False
|
||||||
|
**/
|
||||||
|
public function isLdapError($data) {
|
||||||
|
if (Net_LDAP2::isError($data)) {
|
||||||
|
LSerror :: addErrorCode(0,$data -> getMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue