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)
|
if User.exists?(email: @gestionnaire.email)
|
||||||
GestionnaireMailer.user_to_gestionnaire(@gestionnaire.email).deliver_later
|
GestionnaireMailer.user_to_gestionnaire(@gestionnaire.email).deliver_later
|
||||||
else
|
else
|
||||||
User.create(email: email, password: password)
|
User.create(email: email, password: password, confirmed_at: DateTime.now)
|
||||||
end
|
end
|
||||||
flash.notice = 'Accompagnateur ajouté'
|
flash.notice = 'Accompagnateur ajouté'
|
||||||
else
|
else
|
||||||
|
|
|
@ -21,7 +21,8 @@ class Administration < ApplicationRecord
|
||||||
administrateur.invite!(id)
|
administrateur.invite!(id)
|
||||||
User.create({
|
User.create({
|
||||||
email: email,
|
email: email,
|
||||||
password: password
|
password: password,
|
||||||
|
confirmed_at: DateTime.now
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue