Auto-login via NCue session
If already logged in on ncue.net (Google), reuse NCue session and skip DreamGirl admin prompt. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
10
login.php
10
login.php
@@ -4,6 +4,16 @@ require_once __DIR__ . '/auth/auth.php';
|
||||
|
||||
dreamgirl_session_start();
|
||||
|
||||
$didSso = false;
|
||||
// If the user is already logged-in to NCue (Google), auto-login to DreamGirl.
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$didSso = dreamgirl_try_ncue_sso_login();
|
||||
if ($didSso) {
|
||||
header('Location: ' . dreamgirl_url('index.php'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$error = '';
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$username = isset($_POST['username']) ? (string)$_POST['username'] : '';
|
||||
|
||||
Reference in New Issue
Block a user