mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
DEV: Rake task for creating admin should ask for full name if required (#11096)
This commit is contained in:
parent
1476e17c35
commit
5c662128d3
@ -74,6 +74,10 @@ task "admin:create" => :environment do
|
||||
admin.password = password
|
||||
end
|
||||
|
||||
if SiteSetting.full_name_required && admin.name.blank?
|
||||
admin.name = ask("Full name: ")
|
||||
end
|
||||
|
||||
# save/update user account
|
||||
saved = admin.save
|
||||
say(admin.errors.full_messages.join("\n")) unless saved
|
||||
|
Loading…
Reference in New Issue
Block a user