18 lines
596 B
PHP
18 lines
596 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/includes/bootstrap.php';
|
|
|
|
$destination = trim((string)($_GET['destination'] ?? 'panel'));
|
|
$returnPath = website_safe_return_path((string)($_GET['return'] ?? ''), 'home.php?m=dashboard&p=dashboard');
|
|
|
|
website_log_activity('Deprecated website SSO endpoint redirected to direct login/navigation', (int)($_SESSION['website_user_id'] ?? 0), 'sso_deprecated_redirect');
|
|
|
|
if ($destination === 'panel') {
|
|
header('Location: ' . panel_url($returnPath), true, 302);
|
|
exit;
|
|
}
|
|
|
|
header('Location: ' . website_url('index.php'), true, 302);
|
|
exit;
|