Icon Menu: Log Out?
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Icon Menu: Log Out?
I have an icon menu that has a link to the login page for my members' only area. In the members' only area, there is going to be a matching menu to navigate the secure area. Where on the main site's menu I have the Log In option, I'd like to have Log Out in the members' area. Is it possible to add the logout script to a menu button?
https://www.eastipswichcameraclub.co.uk/
https://www.eastipswichcameraclub.co.uk/
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- Pablo
- Posts: 24630
- Joined: Sun Mar 28, 2004 12:00 pm
- Location: Europe
- Contact:
Re: Icon Menu: Log Out?
What you can do is link a dedicated logout page, where you add this script at the start of the page.
Code: Select all
<?php
session_start();
unset($_SESSION['username']);
unset($_SESSION['fullname']);
unset($_SESSION['role']);
?>- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Icon Menu: Log Out?
So an empty page with just that code? And do I set that to divert immediately to the index page?
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Icon Menu: Log Out?
This works well, however the LoginInfo object still shows me as logged in. Is there something else that we need to do to reset that?
Thanks.
Thanks.
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- Pablo
- Posts: 24630
- Joined: Sun Mar 28, 2004 12:00 pm
- Location: Europe
- Contact:
Re: Icon Menu: Log Out?
You can use the 'redirect' option in the page properties or use code like this:And do I set that to divert immediately to the index page?
Code: Select all
<?php
session_start();
unset($_SESSION['username']);
unset($_SESSION['fullname']);
unset($_SESSION['role']);
header('Location: ./index.html');
exit;
?>
- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Icon Menu: Log Out?
Yes - as I said, I have that working.
What about the issue with the LoginInfo object still showing me as logged in?
I log out of the members' area and am taken back to the index page - works nicely.
Then I go back to the login page.
Expected: my logininfo object will not show because I am now logged out.
Observed: the logininfo object still shows, even though I am a logged out user.
What about the issue with the LoginInfo object still showing me as logged in?
I log out of the members' area and am taken back to the index page - works nicely.
Then I go back to the login page.
Expected: my logininfo object will not show because I am now logged out.
Observed: the logininfo object still shows, even though I am a logged out user.
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- Pablo
- Posts: 24630
- Joined: Sun Mar 28, 2004 12:00 pm
- Location: Europe
- Contact:
Re: Icon Menu: Log Out?
Once you are on a different page, the username value should no longer be valid.
It is still shows, then the session variables have not been reset.
It is still shows, then the session variables have not been reset.
- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Icon Menu: Log Out?
I’ll try clearing cookies again and retest.
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Icon Menu: Log Out?
It is still happening, so session cookies are not being cleared. What can I do? It isn't actually logging me out at all.
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- Pablo
- Posts: 24630
- Joined: Sun Mar 28, 2004 12:00 pm
- Location: Europe
- Contact:
Re: Icon Menu: Log Out?
Did you add the code at the very top of the page?
- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Icon Menu: Log Out?
I converted the object to a form. The code is at the very top of the page, yes. I haven't done anything to it. There is no other PHP code on the page.
Do you want a temporary login so you can see the issue?
Do you want a temporary login so you can see the issue?
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- AliGW
-

- Posts: 590
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Icon Menu: Log Out?
Just to say that the timeout logout (after ten minutes) logs the user out completely, so it's just the logout menu item that isn't working.
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).