Class: Fortifier::AuthSteps::CheckForBlockedUser

Inherits:
Object
  • Object
show all
Defined in:
app/models/fortifier/auth_steps/check_for_blocked_user.rb

Class Method Summary collapse

Class Method Details

.invoke(params) ⇒ Object



9
10
11
12
13
# File 'app/models/fortifier/auth_steps/check_for_blocked_user.rb', line 9

def self.invoke(params)
  auth_user = params[:auth_user]
  auth_user_blocked = auth_user.blocked?
  params.merge! auth_msg: auth_user_blocked ? Messaging::USER_BLOCKED : nil
end

.skip_step?(params) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
# File 'app/models/fortifier/auth_steps/check_for_blocked_user.rb', line 4

def self.skip_step?(params)
  auth_user = params[:auth_user]
  params[:auth_msg].present? || auth_user.blank? || !auth_user.successful_log_in?
end