mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 01:25:39 +00:00
redirect user to welcome / access level page on first visit #1
This commit is contained in:
parent
b3f26fd215
commit
9f2841220a
8 changed files with 292 additions and 168 deletions
|
|
@ -39,6 +39,21 @@ else if (!$userId = $db->initUserId($_SERVER['REMOTE_ADDR'], USER_DEFAULT_APPROV
|
|||
$response->message = _('Could not init user session');
|
||||
}
|
||||
|
||||
// Get user
|
||||
else if (!$user = $db->getUser($userId))
|
||||
{
|
||||
$response->success = false;
|
||||
$response->message = _('Could not init user info');
|
||||
}
|
||||
|
||||
// On first visit, redirect user to the welcome page with access level question
|
||||
else if (is_null($user->public))
|
||||
{
|
||||
header(
|
||||
sprintf('Location: %s/welcome.php', WEBSITE_URL)
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue