diff --git a/webapp/login.php b/webapp/login.php index 7ba720f..bf8b364 100644 --- a/webapp/login.php +++ b/webapp/login.php @@ -37,9 +37,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $error = 'Invalid security token. Please try again.'; } elseif ($cfUser) { // Session is already started by config.php + // Set all required session variables for isAuthenticated() to work $_SESSION['authenticated'] = true; + $_SESSION['auth_token'] = bin2hex(random_bytes(32)); + $_SESSION['auth_time'] = time(); $_SESSION['user'] = $cfUser['email']; - $_SESSION['login_time'] = time(); + $_SESSION['username'] = $cfUser['email']; // Clear output buffer and redirect if (ob_get_level()) { @@ -464,7 +467,7 @@ try {

-

Sign in to manage your geofeed entries

+

Sign in to manage your IP assets