Update logout.php
authorPatrick McGuire <insidenothing@gmail.com>
Wed, 6 May 2020 12:56:50 +0000 (08:56 -0400)
committerGitHub <noreply@github.com>
Wed, 6 May 2020 12:56:50 +0000 (08:56 -0400)
admin/logout.php

index 6a8ee49..72192d0 100644 (file)
@@ -4,5 +4,15 @@ foreach ( $_COOKIE as $key => $value ){
        unset($_COOKIE[$key]);
        setcookie($key, '', time() - 3600, '/'); 
 }
+// unset cookies
+if (isset($_SERVER['HTTP_COOKIE'])) {
+    $cookies = explode(';', $_SERVER['HTTP_COOKIE']);
+    foreach($cookies as $cookie) {
+        $parts = explode('=', $cookie);
+        $name = trim($parts[0]);
+        setcookie($name, '', time()-1000);
+        setcookie($name, '', time()-1000, '/');
+    }
+}
 header('Location: index.php');
 ?>