User Guide
258 Developing Web Applications with ColdFusion
<!--- modify a record, preserving
other existing attributes --->
<!--- You must include the existing attribute
values plus the new one you want to add. In this
case we are adding a unique member gfarmer to
the Accounting Managers. If we did not include
the existing the existing unique members scarter
and tmorris then they would no longer be unique
members. The modify really is doing a replace on
this attribute. For the next release of ColdFusion
we will provide an option to just update the attribute.
Multiple values for a single attribute are separated
by a comma. If a single attribute value contains a
comma you must escape it by adding an extra comma. For
example the uniquemember value uid=scarter,ou=groups,
o=airius.com must be entered as uid=scarter,,ou=groups,,
o=airius.com Be careful when you do this modify or you
can remove attribute values you did not intend to! --->
<!--- ATTRIBUTES="uniquemember=uid=scarter,,ou=People,,o=airius.com,
uid=tmorris,,ou=People,,o=airius.com,
uid=gfarmer,,ou=People,,o=airius.com" --->
<CFLDAP SERVER="myserver"
ACTION="Modify"
USERNAME="uid=kvaughan, ou=People, o=airius.com"
PASSWORD="bribery"
ATTRIBUTES="uniquemember=uid=scarter,,ou=People,,o=airius.com,
uid=tmorris,,ou=People,,o=airius.com,
id=gfarmer,,ou=People,,o=airius.com"
DN="cn=Accounting Managers, ou=groups; o=airius.com">
3. Change myserver to a valid LDAP server.
4. Change the
uid to a valid user id.
5. Save the page as
ldapaddattr.cfm and view it in your browser.
To insert or update an entry:
1. Open a new file in Studio.
2. Modify the file so that it appears as follows:
<!--- If the update parameter is sent
then run this update --->
<!--- If the insert parameter is sent
then run this insert --->
<CFIF IsDefined(rename_dn)>
<CFLDAP Name="CustomerRename"
SERVER="myserver"
USERNAME="cn=Directory Manager,
o=Ace Industry, c=US"