Invalid login error due to account lockout

Invalid login error due to account lockout

by Danielle Bryan Dizon -
Number of replies: 3

Good day,

I'm having an issue about login errors. I'm currently testing for account lockout threshold feature and I found out that the error that Moodle is displaying in the login page is "Invalid login, please try again" even if the user account is locked.  This is to consider that the user has exceeded the account lockout threshold.

I believe "Invalid login, please try again" error is for logging in with incorrect username or password. I'm expecting an error like "Sorry [user], your account has been locked" if a particular user account has been locked. 

I am using:

Moodle Version: 3.2.2+ (Build: 20170316)

PHP version 5.6

Database: MySql

Average of ratings: -
In reply to Danielle Bryan Dizon

Re: Invalid login error due to account lockout

by Danielle Bryan Dizon -

is there anyway to set the correct error being displayed in the Moodle login page?

In reply to Danielle Bryan Dizon

Re: Invalid login error due to account lockout

by Luis de Vasconcelos -

Change the text of the $string['invalidlogin'] in Site administration / Language / Language customisation. Change it to your preferred message, e.g.:

"Sorry {$a->fullname}, your account has been locked"

In reply to Luis de Vasconcelos

Re: Invalid login error due to account lockout

by Danielle Bryan Dizon -

If I change the $string['invalidlogin'] value with "Sorry {$a->fullname}, your account has been locked", this will tell the user that his account is locked even if it is not. If you just supplied incorrect username or password with an unlocked account, moodle will tell you that you have locked your account.

Are there any $string words(to customize error message) telling the user that their accounts has been locked just by logging in?