fix cf access login
This commit is contained in:
@@ -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 {
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="login-title"><?= htmlspecialchars($appName) ?></h1>
|
||||
<p class="login-subtitle">Sign in to manage your geofeed entries</p>
|
||||
<p class="login-subtitle">Sign in to manage your IP assets</p>
|
||||
</div>
|
||||
|
||||
<div class="login-body">
|
||||
|
||||
Reference in New Issue
Block a user