public function toLdap($value)
{
if ($this->getOperationType() == AttributeConverterInterface::TYPE_SEARCH_TO && $this->expectsBool()) {
$value = $this->getQueryValue($value);
} elseif ($this->expectsBool()) {
$value = $this->getUnlockValue($value);
} else {
$value = $this->getLockDateTime($value);
}
return $value;
}