Changeset View
Changeset View
Standalone View
Standalone View
src/app/Backends/LDAP.php
Show First 20 Lines • Show All 1,350 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* @param \Net_LDAP3 $ldap Ldap connection | * @param \Net_LDAP3 $ldap Ldap connection | ||||
* @param string $message Exception message | * @param string $message Exception message | ||||
* | * | ||||
* @throws \Exception | * @throws \Exception | ||||
*/ | */ | ||||
private static function throwException($ldap, string $message): void | private static function throwException($ldap, string $message): void | ||||
{ | { | ||||
if (empty(self::$ldap) && !empty($ldap)) { | if (empty(self::$ldap)) { | ||||
$ldap->close(); | $ldap->close(); | ||||
} | } | ||||
throw new \Exception($message); | throw new \Exception($message); | ||||
} | } | ||||
/** | /** | ||||
* Create a base DN string for a specified object. | * Create a base DN string for a specified object. | ||||
Show All 19 Lines |