isUserInAnyRole
Description
Determines whether an authenticated user belongs to any role in a list of roles.
Categories
Related
History
ColdFusion
8: Added this function.
Syntax
IsUserInAnyRole(role_list)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| role_list | A comma-delimited list of one or more roles to be tested. |
Returns
True,
if the authenticated user, belongs to any Role in the list; False,
otherwise.
Example
<cfif IsUserInAnyRole(allRoles) >
<cfoutput>Authenticated user is in these roles: #GetUserRoles()#</cfoutput>
<cfelseif >
<cfoutput>Authenticated user is in no roles</cfoutput>
</cfif>