LdapTools\Ldif\Entry\LdifEntryAdd::unicodePwdHack PHP Method

unicodePwdHack() protected method

..
protected unicodePwdHack ( AddOperation $operation )
$operation LdapTools\Operation\AddOperation
    protected function unicodePwdHack(AddOperation $operation)
    {
        if (!$this->isUnicodePwdHackNeeded()) {
            return;
        }
        $attributes = $operation->getAttributes();
        foreach ($attributes as $attribute => $value) {
            if (strtolower($attribute) !== 'unicodepwd') {
                continue;
            }
            $value = is_array($value) ? reset($value) : $value;
            $attributes[$attribute] = base64_encode($value);
        }
        $operation->setAttributes($attributes);
    }