Browse Source

further session-related fixes

Andrew Dolgov 1 year ago
parent
commit
b2b9d3649d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      login.php

+ 4 - 1
login.php

@@ -1,5 +1,6 @@
 <?php
 	require_once "config.php";
+	require_once "sessions.php";
 
 	@$op = $_REQUEST["op"];
 
@@ -17,11 +18,13 @@
 		$sth->execute([$user, $password]);
 
 		if ($line = $sth->fetch()) {
-			require_once "sessions.php";
 
 			if (session_status() != PHP_SESSION_NONE) {
 				session_destroy();
 				session_commit();
+
+				header("Location: login.php");
+				return;
 			}
 
 			session_regenerate_id(true);