Updating A Directory Entry - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Updating a directory entry

The
tag lets you change the values of entry attributes. To do so, you specify the entry DN
cfldap
in the
attribute, and list the attributes to change and their new values in the
dn
attribute.
The following example builds on the code that adds and deletes an entry. It can update one or
more of an entry's attributes. Because the UID is part of the DN, you cannot change it.
To update an entry:
Open update_ldap.cfm, which you created in
1
Between the
2
cfelseif
following code:
<cfelseif Form.action is "Update">
<cfset attributelist="cn=#Trim(form.FullName)#; sn=#Trim(Form.surname)#;
mail=#Trim(Form.email)#;
telephonenumber=#Trim(Form.phone)#">
<cfldap action="modify"
modifytype="replace"
attributes="#attributeList#"
dn="uid=#Trim(Form.UID)#, ou=People, o=Airius.com"
server=#myServer#
username=#myUserName#
password=#myPassword#>
<cfoutput><h3>Entry for User ID #Form.UID# has been updated</h3>
</cfoutput>
At the end of the code for the Delete button (the
3
of the form
, delete the
)
After the end of the Delete button
4
&nbsp
<input type="Submit"
name="action"
value="Update"
tabindex="9"></td>
Save the file and run it in your browser.
5
Form.action is "Retrieve"
mark.
</td>
tag, add the following code:
input
"Adding a directory entry" on page
block and the
tag with
input
Value=Delete)
Updating an LDAP directory
attributes
489.
tag, add the
</cfif>
at the bottom
495

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents