Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

creating a login/out link


Reply

2 Posts   415 Views

Avatar
wake2010

11 January 2012 at 2:40pm Community Member, 9 Posts

how do i add a login/out link on the front end of the site?

i would like it so that when a user is not logged in it shows log in and when they are dynamicly says log out

any ideas?

thanks

Avatar
Sticks

11 January 2012 at 4:04pm (Last edited: 11 January 2012 4:05pm), Community Member, 29 Posts

In your Page.ss (or other .ss template file) you can use something like this:

<% if CurrentMember %>
<a href="/Security/logout">Log out</a>
<% else %>
<a href="/Security/login">Log in</a>
<% end_if %>