Multiple UDs

AJ Mercer <[email protected]>
Newsgroups gmane.comp.cms.farcry.devel
Message-ID <CAPURtC0GuGCnx6FSV6RRzCPJv2=xTLhOL9yJ5jH4hx3036G_XQ@mail.gmail.com>
With authenticate() in
    /farcry/core/packages/security/security.cfc

I can not figure out how this is meant to work
It will break out of the loop on a fail

<cfloop list="#udlist#" index="ud">
<!--- Authenticate user --->
<cfset stResult =
this.userdirectories[ud].authenticate(argumentCollection="#arguments#") />
 <cfif structkeyexists(stResult,"authenticated")>
<!--- *This allows your userdirectory check multiple user directories and
pass back the successfull one.* --->
<cfparam name="stResult.UD" default="#ud#" />
 <cfif not stResult.authenticated>
<farcry:logevent type="security" event="loginfailed"
userid="#stResult.userid#_#stResult.UD#" notes="#stResult.message#" />
*<cfbreak />*
</cfif>
 <!--- SUCCESS - log in user --->
<cfset login(userid=stResult.userid,ud=stResult.UD) />
 <!--- Return 'success' --->
<cfbreak />
</cfif>
</cfloop>

I think it should look like this

<cfloop list="#udlist#" index="ud">
<!--- Authenticate user --->
<cfset stResult =
this.userdirectories[ud].authenticate(argumentCollection="#arguments#") />
 <cfif structkeyexists(stResult,"authenticated")>
<!--- This allows your userdirectory check multiple user directories and
pass back the successfull one. --->
<cfparam name="stResult.UD" default="#ud#" />
 <cfif not stResult.authenticated>
<farcry:logevent type="security" event="loginfailed"
userid="#stResult.userid#_#stResult.UD#" notes="#stResult.message#" />
*<cfelse>*
 <!--- SUCCESS - log in user --->
 <cfset login(userid=stResult.userid,ud=stResult.UD) />
 <!--- Return 'success' --->
 <cfbreak />
  </cfif>
</cfif>
</cfloop>

Instructions for UD implementations
<!--- This function should return a struct in the form:
.AUTHENTICATED = false
.MESSAGE = ""
OTHER VALUES CAN BE ADDED FOR USE BY CUSTOM LOGIN FORMS
  OR
.AUTHENTICATED = true
.USERID = "" (This ID only needs to be unique for this user directory)
  OR
EMPTY (If no form submission was detected)
--->
-- 

*AJ Mercer*
<webonix:net strength="Industrial" /> <http://webonix.net> | <webonix:org
community="Open" /> <http://webonix.org>
http://twitter.com/webonix
Railo Community Manager <http://www.getrailo.org/index.cfm/community/team/>

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/[email protected]
To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.