public function setPassword($password)
{
$connection = $this->query->getConnection();
if (!$connection->isUsingSSL() && !$connection->isUsingTLS()) {
$message = 'SSL or TLS must be configured on your web server and enabled to set passwords.';
throw new AdldapException($message);
}
$modification = new BatchModification($this->schema->unicodePassword(), LDAP_MODIFY_BATCH_REPLACE, [Utilities::encodePassword($password)]);
return $this->addModification($modification);
}