diff --git a/index.php b/index.php index 5e29503..ffc18a2 100644 --- a/index.php +++ b/index.php @@ -45,11 +45,18 @@ if (isset($_GET['sso']) && !dbnToolsIsAuthenticated()) { } $isAuthed = dbnToolsIsAuthenticated(); -$userEmail = $isAuthed ? (string)($_SESSION['dbn_tools_user_email'] ?? '') : ''; + +// Authenticated users have no reason to see the marketing landing page. +if ($isAuthed) { + header('Location: /dashboard.php'); + exit; +} + +$userEmail = ''; $tools = dbnToolsLaunchedTools($uiLang); $workbench = dbnToolsWorkbenchMeta($uiLang); $langPath = '/'; -$toolsLogin = 'https://dobetternorge.no/tools-login.php?return=' . urlencode($returnPath); +$toolsLogin = 'https://dobetternorge.no/tools-login.php?return=' . urlencode('/dashboard.php'); $registerUrl = 'https://dobetternorge.no/register.php'; require_once __DIR__ . '/includes/tool-svgs.php'; @@ -96,14 +103,7 @@ window.DBN_TOOLS_LANG = = json_encode($uiLang, JSON_UNESCAPED_UNICODE) ?>; = htmlspecialchars(dbnToolsLanguageLabel($langCode)) ?> - -
= htmlspecialchars(dbnToolsT('tools_section_sub', $uiLang)) ?>
= htmlspecialchars($workbench['badge']) ?>
= htmlspecialchars($workbench['description']) ?>
- = htmlspecialchars($isAuthed ? dbnToolsT('enter_workbench', $uiLang) : dbnToolsT('primary_access', $uiLang)) ?> → + = htmlspecialchars(dbnToolsT('primary_access', $uiLang)) ?> →