mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Revert "Update contact(s) name based on eIdentity data from Registrant API"
This reverts commit 7a6568c34a
.
This commit is contained in:
parent
c72ca8d157
commit
f5e0e811d9
1 changed files with 0 additions and 7 deletions
|
@ -2,7 +2,6 @@ class RegistrantUser < User
|
|||
attr_accessor :idc_data
|
||||
|
||||
devise :trackable, :timeoutable
|
||||
after_save :update_related_contacts
|
||||
|
||||
def ability
|
||||
@ability ||= Ability.new(self)
|
||||
|
@ -55,12 +54,6 @@ class RegistrantUser < User
|
|||
username.split.second
|
||||
end
|
||||
|
||||
def update_related_contacts
|
||||
cc, idcode = registrant_ident.split('-')
|
||||
contacts = Contact.where(ident: idcode, country_code: cc).where('name != ?', username)
|
||||
contacts.each { |c| c.update(name: username) }
|
||||
end
|
||||
|
||||
class << self
|
||||
def find_or_create_by_api_data(user_data = {})
|
||||
return false unless user_data[:ident]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue