Fixing style errors.

This commit is contained in:
stickler-ci 2021-09-16 07:31:23 +00:00
parent 8c1b3efc47
commit 9d3b680259

View File

@ -486,10 +486,10 @@ class Ldap
// For better compatibility with Samba4 AD // For better compatibility with Samba4 AD
if ($this->serverType == "activedirectory") { if ($this->serverType == "activedirectory") {
unset($info['cn']); // To avoid error : Operation not allowed on RDN (Code 67) unset($info['cn']); // To avoid error : Operation not allowed on RDN (Code 67)
// To avoid error : LDAP Error: 53 (Unwilling to perform) // To avoid error : LDAP Error: 53 (Unwilling to perform)
if(isset($info['unicodePwd'])){ if (isset($info['unicodePwd'])) {
$info['unicodePwd'] = mb_convert_encoding("\"".$info['unicodePwd']."\"", "UTF-16LE", "UTF-8"); $info['unicodePwd'] = mb_convert_encoding("\"".$info['unicodePwd']."\"", "UTF-16LE", "UTF-8");
} }
} }
$result = @ldap_modify($this->connection, $dn, $info); $result = @ldap_modify($this->connection, $dn, $info);