Stewrat Posted November 26, 2011 Posted November 26, 2011 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
ryan Posted November 27, 2011 Posted November 27, 2011 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
Stewrat Posted November 28, 2011 Author Posted November 28, 2011 Ryan, Nice and simple! Many thanks, worked a treat. Stewart
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now