cfdocs.org /

Description

Logs the current user out. Removes knowledge of the user ID, password, and roles from the server. If you do not use this tag, the user is automatically logged out when the session ends.

Category

Security tags

Syntax

<cflogout>

See also

cflogin, cfloginuser, GetAuthUser, GetUserRoles, IsUserInAnyRole, IsUserInRole, IsUserLoggedIn, Securing Applications in Developing ColdFusion Applications

History

ColdFusion MX 6.1: Changed behavior: if the Session scope is enabled, a login remains in effect until the session expires or the user is logged out by the cflogout tag.

ColdFusion MX: Added this tag.

Example

<cflogin> 
    <cfloginuser  
        name = "foo" 
        password ="bar" 
        roles = "admin"> 
</cflogin> 
<cfoutput>Authorized user: #getAuthUser()#</cfoutput> 
<cflogout> 
<cfoutput>Authorized user: #getAuthUser()#</cfoutput>