Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Give admins the ability to customize the error message a user sees if their login fails.
Admin interface on vertical tabs on /admin/config/people/accounts
I've written a patch that I believe accomplishes this.
Comments
Comment #1
serundeputy CreditAttribution: serundeputy commentedComment #2
serundeputy CreditAttribution: serundeputy commentedComment #4
serundeputy CreditAttribution: serundeputy commentedreroll fixing failures.
Comment #5
serundeputy CreditAttribution: serundeputy commentedComment #6
dcam CreditAttribution: dcam commentedNew features must be added to the current development version first.
Comment #8
serundeputy CreditAttribution: serundeputy commentedre-roll fixing errors.
Comment #9
serundeputy CreditAttribution: serundeputy commentedComment #11
serundeputy CreditAttribution: serundeputy commentedre-roll need correct syntax.
Comment #12
serundeputy CreditAttribution: serundeputy commentedComment #14
longwaveIt is unlikely that such a feature will ever be added to Drupal 7 at this stage, and as @dcam mentioned it would need to be added to Drupal 8 first anyway.
Besides, it is easy enough to achieve this without modifying Drupal core. https://www.drupal.org/project/stringoverrides will let you alter this text and anything else that is wrapped in t().
Comment #15
serundeputy CreditAttribution: serundeputy commentedComment #16
aneek CreditAttribution: aneek commented@longwave, Drupal 8 as of now doesn't have stringoverrides module. But it will become available when Drupal 8 is stable. But as of this feature request, do you think its worth having in Drupal 8 core?
@serundeputy, in the patch created I can see that you added a way to override "Have you forgotten your password" message. But what about the IP ban messages or the flood controlled messages?
Lets discuss this and if this a feature worth having in Drupal 8 core then surely this can be made. :)
Comment #19
dpiThere are many hundreds of calls to
drupal_set_message
in Drupal 8, it doesn't make sense to have untranslatable text field for each. Installing Locale is a good trade for the minority of sites that want to customise the message.See Change default strings (text) without using full translation system for workarounds.