Articles / How to disable user lockout in Craft CMS
Aug 06. 2018 · by Helge Sverre

How to disable user lockout in Craft CMS

You can change the behaviour of user lockouts in CraftCms by changing the following settings in your config/general.php file, this might be useful to do in development.

// Add these 2 lines
'maxInvalidLogins' => 3,
'invalidLoginWindowDuration' => 'PT10S',

Specify how many invalid logins you can have within the invalidLoginWindowDuration before the account is locked, in the example above the time is set to 10 seconds, to disable user locking, set this value to false or 0, when you do, the invalidLoginWindowDuration option will no longer do anything.

'maxInvalidLogins' => false, // Disabled user locking

This configuration option takes a PHP interval specification, you can read the documentation on how to format this string in the PHP documentation.

Helge Sverre Hessevik Liseth

Book 1:1 help from me on CodeMentor, get expert advice and help with CraftCMS, Flutter or Laravel.

  • Flutter
  • CraftCMS
  • PHP
  • VueJS
Book session