anon-ghost mode, and ghosts can't sign up for accounts

This commit is contained in:
Shish
2019-11-28 21:32:18 +00:00
parent 26e24c8988
commit 30b85f58db
6 changed files with 92 additions and 72 deletions

View File

@@ -397,7 +397,12 @@ class UserPage extends Extension
private function page_create()
{
global $config, $page;
global $config, $page, $user;
if ($user->can(Permissions::CREATE_USER)) {
$this->theme->display_error(403, "Account creation blocked", "Account creation is currently disabled");
return;
}
if (!$config->get_bool("login_signup_enabled")) {
$this->theme->display_signups_disabled($page);
} elseif (!isset($_POST['name'])) {