diff --git a/app/models/user.rb b/app/models/user.rb index 06c4f6a09..7945bf875 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -30,6 +30,7 @@ class User < ApplicationRecord def self.find_for_france_connect(email, siret) user = User.find_by(email: email) + if user.nil? User.create(email: email, password: Devise.friendly_token[0, 20], siret: siret) else