Description

Retrieves the list of roles for the current user. This function returns only ColdFusion roles, not roles set for the servlet API.

Returns

The list of roles for the current user.

Category

Security functions

Function syntax

GetUserRoles()

See also

cflogincfloginusercflogoutGetAuthUserIsUserInAnyRoleIsUserInRoleIsUserLoggedInSecuring Applications in the Developing ColdFusion Applications

History

ColdFusion 8: Added this function.

Example

<cfloginuser name = "#cflogin.name#" password = "#cflogin.password#"
roles = "#GetUserRoles()#" />

 

Note:

From ColdFusion 11 onwards, this function is not applicable when a user is logged in using Admin API. 

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy