Register an account
validate_username($_POST['user_pass']);
$password = $form->validate_password($_POST['user_pass'], $_POST['user_pass_check']);
$invite_code = $form->validate_invite_code($_POST['invite_code']);
$form->on_success(function () use ($username, $password, $invite_code) {
User::register($username, $password);
$inviter = new User();
$inviter->get_by_invite_code($invite_code);
$inviter->update_invite_code();
echo 'Account successfully registered! You can now sign in
';
});
}
?>