Jump to content

Client Logout Page


Stewrat
 Share

Recommended Posts

Hi.

I have successfully managed to set up client login pages etc. thanks to the detailed help in this form.

I am now looking to add a simply 'logout' link for clients. I can use the standard admin logout link, but I would like to ceate a page that matches the rest of the site.

Any help would be appreciated.

Thanks,

Stewart

Link to comment
Share on other sites

Stewart, to log a user out, you just need to call $session->logout(); before outputting any data. If you want, you could use your existing login template and do something like this:

<?php
if($input->get->logout == 1) {
   $session->logout();
   $session->redirect("./"); // start them on a fresh page, or redirect to another
}

Your logout link should be to: /your/login/page/path/?logout=1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...