Merge pull request #10740 from colinux/debug-email-verified
ETQ tech et super-admin, je veux voir rapidement si un user a son email verifié
This commit is contained in:
commit
6e9fb7f247
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue