getUser(); header("Location: https://" . $_SERVER['HTTP_HOST'] . "/"); exit; } catch (\Exception $e) { include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "header.php"))); echo "
There was an authentication error.
\n"; include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "footer.php"))); } } $auth0_user = $auth0->getUser(); if (isset($auth0_user)) $username = $auth0_user["sub"]; else $username = null; include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "header.php"))); if ($username) { $q = new UserQuery; $user = $q->findOneByUsername($username); if (! $q->count()) { echo "User $username needs an entry in the user table.
\n"; } else { $user_id = $user->getContactId(); $admin_level = $user->getAdmin(); if ($module) { echo "