Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Bought Jack McDade's course on design. Going through it now...and it is SO well done!

— Justin Jackson, Transistor.fm

User:Logout Tag

Example

{{ if should_logout_for_whatever_reason }}
{{ user:logout redirect="/somewhere" }}
{{ /if }}
@if ($should_logout_for_whatever_reason)
<s:user:logout redirect="/somewhere" />
@endif

This will immediately log a user out and redirect to /somewhere if the condition is met.

If you'd like to just output a link, use the user:logout_url tag.

Parameters

redirect

string

Where the user should be redirected after logging out. Defaults to the home page.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →