1
0
Fork 0
mirror of https://gitlab.easter-eggs.com/ee/ldapsaisie.git synced 2024-12-23 17:03:47 +01:00

LSerror : Added function isLdapError()

This commit is contained in:
Benjamin Renard 2009-10-25 23:38:28 +00:00
parent 8e498f34fa
commit 3205bd4435

View file

@ -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;
}
} }
/* /*