sloap
asked on
CFLDAP - adding a user to a distribution group
I am trying to update a distribution group using cfldap. There's not a lot of information out there on doing this, so I've gotten about this far. Can anyone explain where I'm going wrong...it looks like there's something wrong with the attributes:
<cfldap action="modify"
modifytype="add"
dn="CN=financelist,ou=fina nce,dc=INF OSERVICES, dc=domain"
attributes = "member=CN=jonathan,CN=Use rs,DC=info services,D C=domain"
delimiter=","
separator="|"
server = "MYSERVER"
username="MYUSERID"
password="MYPASSWORD"
>
<cfldap action="modify"
modifytype="add"
dn="CN=financelist,ou=fina
attributes = "member=CN=jonathan,CN=Use
delimiter=","
separator="|"
server = "MYSERVER"
username="MYUSERID"
password="MYPASSWORD"
>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
<!---Get the current members of the group--->
<cfldap
action = "query"
name = "results"
separator="|"
start = "dc=INFOSERVICES,dc=domain
filter='cn=financelist'
attributes = "cn,o,title,mail,telephone
server = "MYSERVER"
username="MYUSERID"
password="MYPASSWORD">
<!---create a variable to hold the current memebers and put a separator at the from of the list--->
<cfparam name="currentmembers" default="">
<cfif results.member is not ''>
<cfset currentmembers='|#results.
</cfif>
<!---post it--->
<cfldap action="modify"
modifytype="replace"
dn="CN=financelist,ou=fina
attributes = "member=CN=jonathan,CN=Use
delimiter=","
separator="|"
server = "MYSERVER"
username="MYUSERID"
password="MYPASSWORD"
>