Skip to content
Snippets Groups Projects
Unverified Commit 1a245cf4 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

do not sync email

parent b1c3b9c4
No related branches found
No related tags found
No related merge requests found
......@@ -13,11 +13,10 @@ module User::WithPerson
protected
def find_or_create_person
person = university.people.where(email: email).first_or_initialize do |person|
person.first_name = first_name
person.last_name = last_name
person.slug = person.to_s.parameterize
end
person = university.people.where(email: email).first || university.people.new
person.first_name = first_name
person.last_name = last_name
person.slug = person.to_s.parameterize
person.user = self
person.save
end
......@@ -25,7 +24,6 @@ module User::WithPerson
def sync_person
person.first_name = first_name
person.last_name = last_name
person.email = email
person.slug = person.to_s.parameterize
person.picture.purge if picture_infos.present? && person.picture&.attached?
person.save
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment