This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/services/setup_local_account_service.rb
2016-02-26 15:28:08 +01:00

15 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