Properly delete the persistentlogin cookie

The previous solution did not delete the cookie.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2020-05-22 16:21:56 +03:00
parent a6ad0dcef8
commit 3dc8d9c5e3

View File

@@ -28,7 +28,7 @@
if(isset($_GET["logout"]))
{
session_unset();
setcookie('persistentlogin', '');
setcookie('persistentlogin', '', 1);
header('Location: index.php');
exit();
}
@@ -52,7 +52,7 @@
{
// Invalid cookie
$auth = false;
setcookie('persistentlogin', '');
setcookie('persistentlogin', '', 1);
}
}
// Compare doubly hashes password input with saved hash