diff --git a/app/controllers/users/activate_controller.rb b/app/controllers/users/activate_controller.rb index 31bd7ef35..b4d05d8ab 100644 --- a/app/controllers/users/activate_controller.rb +++ b/app/controllers/users/activate_controller.rb @@ -36,7 +36,7 @@ class Users::ActivateController < ApplicationController user = User.find_by(confirmation_token: params[:token]) if user && user.email_verified_at flash[:notice] = "Votre email est déjà vérifié" - elsif user && 2.days.ago < user.confirmation_sent_at + elsif user && user.confirmation_sent_at >= 2.days.ago user.update!(email_verified_at: Time.zone.now) flash[:notice] = 'Votre email a bien été vérifié' else