Browse Source

Setting an error message (instead of a notice) on attempt failure.

for_activeadmin
John Bradley 12 years ago
parent
commit
8f32e92f96
  1. 2
      app/controllers/devise/two_factor_authentication_controller.rb

2
app/controllers/devise/two_factor_authentication_controller.rb

@ -16,7 +16,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController
else
resource.second_factor_attempts_count += 1
resource.save
set_flash_message :notice, :attempt_failed
set_flash_message :error, :attempt_failed
if resource.max_login_attempts?
sign_out(resource)
render :template => 'devise/two_factor_authentication/max_login_attempts_reached' and return

Loading…
Cancel
Save