Log out not working with Log me in automatically
I have created a user log in form with remember my information and Log me in automatically check boxes and a log out page using SecurityAssist.
Please see link below:
http://www.hackneyhydroponics.co.uk/demo/index.php
e-mail: jason@hitaroo.com
password: hhypass
The log in form works fine as it should do with the remember my information and Log me in automatically check boxes checked.
It remembers user details when the Remember my information check box is checked.
It log me in automatically when the Log me in automatically check box is checked.
I have created a log out link on the log in successful page which goes to the log out page created with SecurityAssist. All fine up to here - the problem is that the log out page does not work and does not work and does not log out the user!
If I click the log out link it takes me to the log out page, I close my browser window and re-open the browser and go to the log in page it logs me in automatically and does not ask for username or password.
I have found the same issue on the Webassist live website. I log into my account click the log out link it takes me to the log out page, I close the browser, reopen the browser go to any page on the Webassist website and it logs me in automatically and I can assess all my account details.
The only way I can log out of the Webassist website and my log in page is to clear cookies manually from my computer. This is not very secure as I access my account on the Wbassist website from work and I am logged in at all times as I have discovered today.
On the log out page I have the following code:
<?php
@session_start();
if ("" == "") {
// WA_ClearSession
$clearAll = TRUE;
$clearThese = explode(",","");
if($clearAll) {
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value) {
unset($_SESSION[$value]);
}
}
}
Please help!