MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 491

Developing coldfusion mx applications
Table of Contents

Advertisement

action="query"
attributes="cn,sn,mail,telephonenumber,uid"
start="o=Airius.com"
scope="subtree"
filter="ou=Human Resources"
sort="sn,cn"
sortControl="asc, nocase">
<table border="1">
<tr>
<th>Full Name</th>
<th>Surname</th>
<th>Mail</th>
<th>Phone</th>
<th>UID</th>
</tr>
<cfoutput query="GetList">
<tr>
<td>#GetList.cn#</td>
<td>#GetList.sn#</td>
<td>#GetList.mail#</td>
<td>#GetList.telephonenumber#</td>
<td>#GetList.uid#</td>
</tr>
</cfoutput>
</table>
</body>
</html>
At the top of the file, change the myServer, myUserName, and myPassword variable
2
assignments to values that are valid for your LDAP server.
Save the page as update_ldap.cfm and run it in your browser.
3
Reviewing the code
The following table describes the code:
Code
<cfset myServer="ldap.myco.com">
<cfset myUserName="cn=Directory
Manager">
<cfset myPassword="password">
<cfparam name="fullNameValue"
default="">
<cfparam name="surnameValue"
default="">
<cfparam name="emailValue"
default="">
<cfparam name="phoneValue"
default="">
<cfparam name="uidValue" default="">
<cfif isdefined("Form.action") AND
Trim(Form.uid) IS NOT "">
<cfif Form.action is "add">
Description
Initializes the LDAP connection information
variables. Uses variables for all connection
information so that any changes have to be made in
only one place.
Sets the default values of empty strings for the form
field value variables. The data entry form uses
cfinput
fields with
value
form can be prefilled and so that, if the user submits
an incomplete form, ColdFusion can retain any
entered values in the form when it redisplays the
page.
Ensures that the user entered a User ID in the form.
If the user clicks Add, processes the code that
follows.
Updating an LDAP directory
attributes so that the
491

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion mx

Table of Contents