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 = ; - -
- - -
- - @@ -130,15 +130,7 @@ window.DBN_TOOLS_LANG = ; - -
- - - -
- - @@ -164,7 +156,7 @@ window.DBN_TOOLS_LANG = ;

- + @@ -172,7 +164,7 @@ window.DBN_TOOLS_LANG = ;

- +
$item): ?> @@ -189,11 +181,6 @@ window.DBN_TOOLS_LANG = ; - -
- -
-