mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
14 lines
358 B
Ruby
14 lines
358 B
Ruby
class SetupLocalAccountService < BaseService
|
|
# Setup an account for a new user instance by generating
|
|
# an RSA key pair and a profile
|
|
# @param [User] user Unsaved user instance
|
|
# @param [String] username
|
|
def call(user, username)
|
|
user.build_account
|
|
|
|
user.account.username = username
|
|
user.account.domain = nil
|
|
|
|
user.save!
|
|
end
|
|
end
|