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 diff --git a/app/dashboards/user_dashboard.rb b/app/dashboards/user_dashboard.rb index e51646cc6..d9a4cb4c4 100644 --- a/app/dashboards/user_dashboard.rb +++ b/app/dashboards/user_dashboard.rb @@ -12,6 +12,7 @@ class UserDashboard < Administrate::BaseDashboard ATTRIBUTE_TYPES = { id: Field::Number.with_options(searchable: true), email: Field::String, + email_verified_at: Field::DateTime, confirmed?: Field::Boolean, created_at: Field::DateTime, updated_at: Field::DateTime, @@ -41,6 +42,7 @@ class UserDashboard < Administrate::BaseDashboard :id, :email, :confirmed?, + :email_verified_at, :current_sign_in_at, :created_at, :blocked_at,