ldap_mod_replace

(PHP 4, PHP 5, PHP 7, PHP 8)

ldap_mod_replaceReplace attribute values with new ones

Опис

ldap_mod_replace(
    LDAP\Connection $ldap,
    string $dn,
    array $entry,
    ?array $controls = null
): bool

Replaces one or more attributes from the specified dn. It may also add or remove attributes.

Параметри

ldap

Примірник LDAP\Connection, якого повертає ldap_connect().

dn

The distinguished name of an LDAP entity.

entry

An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it.

controls

Array of LDAP Controls to send with the request.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Журнал змін

Версія Опис
8.1.0 Тепер параметр ldap має бути примірником LDAP\Connection; раніше очікувався дійсний resource ldap link.
8.0.0 Параметр controls тепер може бути null; раніше початково було [].
7.3.0 Support for controls added

Примітки

Зауваження: Ця функція є бінарно безпечною.

Прогляньте також