Fix unconfirmed users clean-up issues [SCI-3172]

This commit is contained in:
Oleksii Kriuchykhin 2019-03-29 11:11:53 +01:00
parent 913bdd91be
commit 7d4fbcb32e
2 changed files with 3 additions and 1 deletions

View file

@ -58,6 +58,8 @@ module Users
reason: I18n.t('devise.linkedin.failed_to_save'))
redirect_to after_omniauth_failure_path_for(resource_name) and return
end
# Confirm user
@user.update_column(:confirmed_at, @user.created_at)
redirect_to users_sign_up_provider_path(user: @user)
end
end

View file

@ -209,7 +209,7 @@ class User < ApplicationRecord
has_many :user_notifications, inverse_of: :user
has_many :notifications, through: :user_notifications
has_many :user_system_notifications
has_many :user_system_notifications, dependent: :destroy
has_many :system_notifications, through: :user_system_notifications
has_many :zip_exports, inverse_of: :user, dependent: :destroy
has_many :datatables_teams, class_name: '::Views::Datatables::DatatablesTeam'