FEATURE: Add option to hide full name input at signup (#30471)

This commit replaces the `full_name_required` setting with a new `full_name_requirement` setting to allow more flexibility with the name field in the signup form. The new setting has 2 options, "Required at signup" and "Optional at signup", which are equivalent to the true/false possibilities of the old setting, and a third option "Hidden at signup" that hides the name field from the signup form, making it effectively optional too.

New sites will have the "Hidden at signup" option as the default option, and existing site will continue to use the option that maps to their current configuration.

Internal topic: t/136746.
This commit is contained in:
Osama Sayegh
2024-12-30 22:26:20 +03:00
committed by GitHub
parent b728b74c49
commit 3187606d34
27 changed files with 217 additions and 42 deletions

View File

@ -116,7 +116,8 @@ module DiscourseDev
puts "Once site is running use https://localhost:9292/user/#{username}/become to access the account in development"
end
admin.name = ask("Full name: ") if SiteSetting.full_name_required
admin.name = ask("Full name: ") if SiteSetting.full_name_requirement ==
"required_at_signup"
saved = admin.save
if saved