It's doubly confusing because the ROLES attribute of CFFUNCTION works in the reverse way. IsUserInRole does an AND to check for ALL roles, while CFFUNCTION does an OR to check for ANY role.
cheers, barneyb On Wed, 2 Feb 2005 07:38:38 -0800, Sean Corfield <[EMAIL PROTECTED]> wrote: > On Wed, 02 Feb 2005 08:53:31 -0500, Alex Sherwood <[EMAIL PROTECTED]> wrote: > > Does the inUserInRole() function take a list of roles or a single role? > > It can take a list - see: > > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct142.htm > > > The Complete ColdFusionMX Reference has an example where multiple roles > > are passed in, but I cannot get it to work. > > Bear in mind that it checks the user is in *all* of the roles: > > <cfif isUserInRole("admin,hr")> > ... only true if user has BOTH roles ... > </cfif> > > If user is just an admin or just an HR person, that test will be > false. That tends to surprise people. > -- > Sean A Corfield -- http://www.corfield.org/ > Team Fusebox -- http://www.fusebox.org/ > Breeze Me! -- http://www.corfield.org/breezeme > Got Gmail? -- I have 50, yes 50, invites to give away! > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 6 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192775 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

