Hi there, I’m trying to find the origin of the “The username or password you entered is incorrect. Please check the username, re-type the password, and try again.” looking inside the login procesor, it loads from the ‘login_username_password_incorrect’ lexicon, but I can’t find such lexicon configured anywhere in my project, I searched in all files, and in the database.
I also tried loading somewhere else in my site to show the same message, but it won’t load the lexicon, and just print ‘login_username_password_incorrect’
It’s in the core\lexicon\en\login.inc.php file, but there are two keys with that same message:
$_lang['login_cannot_locate_account'] = 'The username or password you entered is incorrect. Please check the username, re-type the password, and try again.';
$_lang['login_username_password_incorrect'] = 'The username or password you entered is incorrect. Please check the username, re-type the password, and try again.';
These same lexicon strings are also in some files for other languages that haven’t been fully translated yet.
This should make them available:
$modx->lexicon->load('login');
If you want to change the message, you should be able to override the message in Lexicon Management (in the login namespace, default, en). If you do that, your change should survive upgrades to MODX. Modifying the file won’t.
Thanks a lot, Bob!, for some reason when I ran a find in all files in my IDE I could not find this line and was going crazy trying to find out where this message was coming from, the $modx->lexicon->load('login'); worked as expected