/**
* {@inheritdoc}
*/
public function toLdap($value)
{
/**
* @todo There's a lot more potential logic that needs to happen for this to be accurate...
*/
if ($this->getOperationType() == AttributeConverterInterface::TYPE_SEARCH_TO && !$value) {
$fb = new FilterBuilder();
$value = $fb->bNot($fb->eq('pwdLastSet', '0'));
} else {
$value = (bool) $value ? '0' : '-1';
}
return $value;
}