ExpressionEngine Docs

Logging Out

Logout Link

This link allows users to log-out of the system. To create the link, use this variable:


Place the variable inside of a link tag:

<a href="{path='logout'}">Log Out</a>

Logout Form Overview

Output a log out form.

{exp:member:logout_form return="mymb/login"}
    <input type="submit" value="Logout">


Valid HTML Form attributes (as listed in the config file), data- and aria- attributes passed through ExpressionEngine tag parameters in the template will be included into generated opening form tag.



Allows you to specify the action attribute of the <form> tag. Handy if you need to ensure that authentication points to SSL portions of your site from non-SSL portions. Often used in conjunction with the return= parameter and the {current_url} global variable so your visitors will go back to the page and domain they logged in from.



This parameter allows you to specify the class attribute for the <form> tag.



This parameter allows you to specify the id attribute for the <form> tag.



This parameter allows you to specify a name attribute for the <form> tag.



This parameter allows you to define where the user will be returned after successfully logging in. The parameter can be defined in two ways:

  1. Use the standard Template_Group/Template syntax to specify where to return the user. For instance, if you want the user to be returned to the “local” Template in the “news” Template Group, you would use: return=”news/local”
  2. Use a full URL. For example: return=”