Add mid login to registrant

This commit is contained in:
Martin Lensment 2015-05-26 18:01:09 +03:00
parent 869c3fa95e
commit 8f109718c7
3 changed files with 14 additions and 2 deletions

View file

@ -29,5 +29,13 @@ class RegistrantUser < User
u
end
def find_or_create_by_mid_data(response)
u = where(registrant_ident: "#{response.user_country}-#{response.user_id_code}").first_or_create
u.username = "#{response.user_givenname} #{response.user_surname}"
u.save
u
end
end
end