Whatever message this page gives is out now! Go check it out!

GetUserRoles

Last update:
May 18, 2026

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

Function syntax

GetUserRoles()

See also

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.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page