The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
358 B

  1. class SetupLocalAccountService < BaseService
  2. # Setup an account for a new user instance by generating
  3. # an RSA key pair and a profile
  4. # @param [User] user Unsaved user instance
  5. # @param [String] username
  6. def call(user, username)
  7. user.build_account
  8. user.account.username = username
  9. user.account.domain = nil
  10. user.save!
  11. end
  12. end