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.



<cflogout session="all|current|others"

See also


ColdFusion (2016 release) Update 4: Added the applicationToken attribute.

ColdFusion 11 Update 12: Added the applicationToken attribute.

ColdFusion 11: Added the session attribute.

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.


Attribute Description Default

When invoked which session should be logged out.

This is a string. The possible values are:

  • all
  • current
  • others
applicationToken When using application token attribute for cflogin, the cookie that gets created uses the application token CFAUTHORIZATION_applicationtoken. The applicationtoken attribute has been added for cflogout tag so that the same application token can be specified here in the cflogout tag. Application Name


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

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