User Guide

Table Of Contents
536 Chapter 23: Managing LDAP Directories
To update an entry:
1.
Open update_ldap.cfm, which you created in Adding a directory entry” on page 528.
2.
Between the cfelseif Form.action is "Retrieve" block and the </cfif> tag, add the
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>
3.
At the end of the code for the Delete button (the input tag with Value=Delete) at the bottom
of the form
), delete the </td> mark.
4.
After the end of the Delete button input tag, add the following code:
&nbsp
<input type="Submit"
name="action"
value="Update"
tabindex="9"></td>
5.
Save the file and run it in your browser.