mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 17:45:34 +08:00
fix admin rake task
This commit is contained in:
parent
641276af46
commit
cd66dd1404
@ -84,8 +84,8 @@ task "admin:create" => :environment do
|
||||
grant_admin = ask("Do you want to grant Admin privileges to this account? (Y/n) ")
|
||||
if (grant_admin == "" || grant_admin.downcase == 'y')
|
||||
admin.grant_admin!
|
||||
if user.trust_level < 1
|
||||
user.change_trust_level!(1)
|
||||
if admin.trust_level < 1
|
||||
admin.change_trust_level!(1)
|
||||
end
|
||||
admin.email_tokens.update_all confirmed: true
|
||||
admin.activate
|
||||
|
Loading…
x
Reference in New Issue
Block a user