How to log out a user?

I have a header, within the header at the right i have a login_group (hidden), and a logout_group (shown)

When the user logs in, i hide the logout_group and show the login_group, this works fine.

When the user logs out (i.e. i have him click a button which says logout), i do the following

  1. Log out the user
  2. Hide the login_group
  3. Show the login_group

But this logout process does not seem to work, it doesn’t hide the login_group nor does it show the logout_group
So it’s just not working, and i’m unsure how to make it work?

All i want to do is, log out the user and show the login functionality.

How can i make this work?

Have a conditional on the group that sets it to visible when the current user is logged in. The default state would be hidden and not visible on load.

This topic was automatically closed after 70 days. New replies are no longer allowed.