diff --git a/themes/danbooru2/user.theme.php b/themes/danbooru2/user.theme.php index 3772db16..6dd1b0cc 100644 --- a/themes/danbooru2/user.theme.php +++ b/themes/danbooru2/user.theme.php @@ -65,13 +65,19 @@ class CustomUserPageTheme extends UserPageTheme public function display_signup_page(Page $page): void { - global $config; + global $config, $user; $tac = $config->get_string("login_tac", ""); $tac = send_event(new TextFormattingEvent($tac))->formatted; $reca = "".captcha_get_html().""; + $email_required = ( + $config->get_bool("user_email_required") && + !$user->can(Permissions::CREATE_OTHER_USER) + ); + $email_text = $email_required ? "Email" : "Email (Optional)"; + if (empty($tac)) { $html = ""; } else { @@ -84,8 +90,8 @@ class CustomUserPageTheme extends UserPageTheme Name Password Repeat Password - Email (Optional) - $reca; + $email_text + $reca