Mike

The following code seems to work, however it does not update everybody
in the OU correctly because with some users it is picking up the second
smtp address hy079 for example and populating the mailnickname with
that?

This may be because in some of the proxyaddresses users have

Smtp    [EMAIL PROTECTED]
Smtp    [EMAIL PROTECTED] etc..

Could the script be used to ignore the hy079 type suffixes (i.e. the
suffixes without a .) ? And only use the a.testuser3 type suffixes ? 

<cfscript>
  s = "#adresult.proxyAddresses#";
  re = "SMTP:([EMAIL PROTECTED]).*";
  s = reReplaceNoCase(s, re, "\1");
  writeoutput("#s#");
</cfscript>

Any ideas?



-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED]
Sent: 06 April 2006 15:16
To: CF-Talk
Subject: RE: CFLDAP Question ?

You have two CFLOOPs in your code.  Both your <cfscript> block and
second <cfldap> query should be in the same <cfloop> block.

Just remove the first </cfloop> and the second <cfloop> and you should
be fine.

What it's doing is you are looping through all of your results and
setting each one to your "s" variable.  Then, when that first loop is
complete, "s" holds the last value.

Then, you start over with the second loop which is using the "s" from
the previous group.

M!ke








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237094
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to