-1

Devise has nice feature called :locakble. It locks when user has failed to login multiple times and sends email to recover it.

All of them works when I use webpages with Devise.

How to check password, make failed attempts and lock my user by using code?

Mr.D
  • 7,353
  • 13
  • 60
  • 119

1 Answers1

0

You can call lock_access! on the model you registered devise for.

https://github.com/plataformatec/devise/blob/master/lib/devise/models/lockable.rb#L40

Axel Tetzlaff
  • 1,355
  • 8
  • 11