Script functions reference > Script functions in alphabetical order > L > LdapReplaceAttrValue

LdapReplaceAttrValue
Syntax
LdapReplaceAttrValue(entryID, attrName, value);
entryID 
attrName
value
Description
Replaces the value(s) of an attribute with another value.
Note:
All values of the attribute named in attrName are removed and replaced by the value given in value. To add further values to an attribute you must use the LdapAddAttrValue function. Changes are not written to the LDAP directory until the LdapUpdateEntry function is called.
Returns
1
-1
Example
ldapReplaceAttrValue($theuser,"description",$insert);
In this example, the value of the description attribute in theuser entry is replaced by the value of the insert variable. For example, if the description attribute contains a list of the formats in which the user wants their invoices, and the insert variable contains the value fax, then all values in the list are removed and fax is added.
OpenText StreamServe 5.6 Updated: 2013-03-01