We haven't been able to catch and override the following user log in error message:
"Sorry, unrecognized username or password. Have you forgotten your password?"
Does it not work with non-authenticated users?
We haven't been able to catch and override the following user log in error message:
"Sorry, unrecognized username or password. Have you forgotten your password?"
Does it not work with non-authenticated users?
Comments
Comment #1
robloachIt should be:
Comment #2
antgiant commentedThank you. Didn't realize that you can only override an entire string as originally entered.
Comment #3
casperovich commentedform_set_error('name', t('Sorry, unrecognized username or password. Have you forgotten your password?', array('@password' => url('user/password'))
But stringoverrides don't replace string.
WHY?
Thanks.
Comment #4
capysara commentedI've tried using the following as noted above, but I still can't get it to override. I've cleared caches and checked my settings.php. Something is clearly interfering. Can you suggest any other things to troubleshoot?
Sorry, unrecognized username or password. Have you forgotten your password?
EDIT:
My specific issue was (in a site I inherited) I have two settings.php files. Settings.php doesn't do anything except for use a function $env_include to call an environment-specific settings.php file, depending on the point of access. I found that I could not modify $conf['locale_custom_strings_en'] in my environment-specific settings.php either. I don't really understand the issue, but String Overrides must be looking for the settings.php file specifically and it won't play nice with the other.settings.php. I'm not able to use the module with this setup, but I can work around it by adding $conf['locale_custom_strings_en'] to my settings.php. Just thought I would share in case someone else comes across this issue. The module works great in my other sites!