Class: Users::ConfirmationsController

Inherits:
Devise::ConfirmationsController
  • Object
show all
Defined in:
app/controllers/users/confirmations_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject


2
3
4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/users/confirmations_controller.rb', line 2

def show
  super do |user|
    # sign in and redirect to new_my_account_email_path,
    # only for new users (.unconfirmed_email.blank?)
    # without identity (.primary_identity_id.blank?)
    if user && user.created_at && user.primary_identity_id.blank? && user.unconfirmed_email.blank?
       user
      SignonStatusTokenService.write_to_cookie(cookies, user)
      redirect_to  and return
    end
  end
end