Explorar el Código

delete session after logout

rajven hace 2 años
padre
commit
e16871bf0b
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      html/logout.php

+ 3 - 0
html/logout.php

@@ -1,4 +1,7 @@
 <?php
 require_once ($_SERVER['DOCUMENT_ROOT']."/inc/auth.utils.php");
+if (isset($_SESSION['session_id'])) {
+    run_sql($db_link, "DELETE FROM sessions WHERE session_id='".$_SESSION['session_id']."'");
+    }
 logout();
 ?>