Merge pull request #2055 from betagouv/fix-double-confirmation
Fix double confirmation
This commit is contained in:
commit
ead4a6a2fd
2 changed files with 3 additions and 2 deletions
|
@ -52,7 +52,7 @@ class Admin::GestionnairesController < AdminController
|
|||
if User.exists?(email: @gestionnaire.email)
|
||||
GestionnaireMailer.user_to_gestionnaire(@gestionnaire.email).deliver_later
|
||||
else
|
||||
User.create(email: email, password: password)
|
||||
User.create(email: email, password: password, confirmed_at: DateTime.now)
|
||||
end
|
||||
flash.notice = 'Accompagnateur ajouté'
|
||||
else
|
||||
|
|
|
@ -21,7 +21,8 @@ class Administration < ApplicationRecord
|
|||
administrateur.invite!(id)
|
||||
User.create({
|
||||
email: email,
|
||||
password: password
|
||||
password: password,
|
||||
confirmed_at: DateTime.now
|
||||
})
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue