mirror of https://github.com/tootsuite/mastodon
Fix admin account created by `mastodon:setup` not being auto-approved (#29379)
parent
f784213c64
commit
7af69f5cf5
|
@ -515,6 +515,7 @@ namespace :mastodon do
|
||||||
owner_role = UserRole.find_by(name: 'Owner')
|
owner_role = UserRole.find_by(name: 'Owner')
|
||||||
user = User.new(email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_invite_request_check: true, role: owner_role)
|
user = User.new(email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_invite_request_check: true, role: owner_role)
|
||||||
user.save(validate: false)
|
user.save(validate: false)
|
||||||
|
user.approve!
|
||||||
|
|
||||||
Setting.site_contact_username = username
|
Setting.site_contact_username = username
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue