<?php

if ($currentUser) {
    header("Location: " . ($_GET["next"] ?? "."));
    exit;
}

if (!REGISTRATION_ENABLED) {
    http_response_code(403);
    msg_error(__("Public registration disabled"));
    exit;
}