2014-10-02 08:38:26 -04:00
|
|
|
class ConfirmationsController < Devise::ConfirmationsController
|
2016-03-11 11:14:29 -05:00
|
|
|
def almost_there
|
|
|
|
flash[:notice] = nil
|
|
|
|
render layout: "devise_empty"
|
|
|
|
end
|
|
|
|
|
2014-10-02 08:38:26 -04:00
|
|
|
protected
|
|
|
|
|
2016-03-11 11:14:29 -05:00
|
|
|
def after_resending_confirmation_instructions_path_for(resource)
|
|
|
|
users_almost_there_path
|
|
|
|
end
|
|
|
|
|
2014-10-02 08:38:26 -04:00
|
|
|
def after_confirmation_path_for(resource_name, resource)
|
|
|
|
if signed_in?(resource_name)
|
2017-09-21 04:29:09 -04:00
|
|
|
after_sign_in(resource)
|
2014-10-02 08:38:26 -04:00
|
|
|
else
|
2017-08-23 00:40:16 -04:00
|
|
|
Gitlab::AppLogger.info("Email Confirmed: username=#{resource.username} email=#{resource.email} ip=#{request.remote_ip}")
|
2016-11-14 20:30:12 -05:00
|
|
|
flash[:notice] += " Please sign in."
|
|
|
|
new_session_path(resource_name)
|
2014-10-02 08:38:26 -04:00
|
|
|
end
|
|
|
|
end
|
2017-09-21 04:29:09 -04:00
|
|
|
|
|
|
|
def after_sign_in(resource)
|
|
|
|
after_sign_in_path_for(resource)
|
|
|
|
end
|
2014-10-02 08:38:26 -04:00
|
|
|
end
|