
468
DEVELOPING
COLDFUSION 9 APPLICATIONS
Accessing and Using Data
Las
t
upda
te
d 8/5/2010
Changing a directory entry’s DN
To change the DN of an entry, provide the following information in the cfldap tag:
dn="original DN"
action="modifyDN"
attributes="dn=new DN"
For example:
<cfldap action="modifyDN"
dn="#old_UID#, ou=People, o=Airius.com"
attributes="uid=#newUID#"
server=#myServer#
username=#myUserName#
password=#myPassword#>
The new DN and the entry attributes must conform to the directory schema; therefore, you cannot move entries
arbitrarily in a directory tree. You can only modify a leaf only. For example, you cannot modify the group name if the
group has children.
Note:
LDAP v2 does not let you change entry DNs.
Advanced topics
Some more advanced techniques enable you to use LDAP directories more effectively.
Specifying an attribute that includes a comma or semicolon
LDAP attribute values can contain commas. The cfldap tag normally uses commas to separate attribute values in a
value list. Similarly, an attribute can contain a semicolon, which
cfldap
normally uses to delimit (separate) attributes
in an attribute list. To override the default separator and delimiter characters, you use the
cfldap
tag
separator
and
delimiter
attributes.
For example, assume that you want to add the following attributes to an LDAP entry:
cn=Proctor, Goodman, and Jones
description=Friends of the company; Rationalists
Use the
cfldap
tag in the following way:
<cfldap action="modify"
modifyType="add"
attributes="cn=Proctor, Goodman, and Jones: description=Friends of the company;
Rationalists"
dn="uid=goodco, ou=People, o=Airius.com"
separator="&"
delimiter=":"
server=#myServer#
username=#myUserName#
password=#myPassword#>
Using cfldap output
You can create a searchable Verity collection from LDAP data. For an example of building a Verity collection using an
LDAP directory, see “
Indexing query results obtained from an LDAP directory
” on page 503.
The ability to generate queries from other queries is useful when cfldap queries return complex data. For more
information on querying queries, see “
Using Query of Queries
” on page 428.