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

GetAuthUser

Last update:
May 18, 2026

Description

Gets the name of an authenticated user.

Returns

The name of an authenticated user.

Category

Function syntax

GetAuthUser()

See also

History

ColdFusion MX: Added this function.

Usage

This function works with cflogin authentication or web server authentication. It checks for a logged-in user as follows:
  1. It checks for a login made with cfloginuser.
  2. If no user was logged in with cfloginuser, it checks for a web server login (cgi.remote_user).

Example

<H3>GetAuthUser Example</H3> 
 

<P>Authenticated User: <cfoutput>#GetAuthUser()#</cfoutput>
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