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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

serundeputy’s picture

serundeputy’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: user-login-fail-custom-message-2314381-1.patch, failed testing.

serundeputy’s picture

reroll fixing failures.

serundeputy’s picture

Status: Needs work » Needs review
dcam’s picture

Version: 7.x-dev » 8.0.x-dev
Status: Needs review » Needs work
Issue tags: -Login error, -user module

New features must be added to the current development version first.

The last submitted patch, 4: user-login-fail-custom-message-2314381-2.patch, failed testing.

serundeputy’s picture

Version: 8.0.x-dev » 7.x-dev
FileSize
4.01 KB

re-roll fixing errors.

serundeputy’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 8: user-login-fail-custom-message-2314381-3.patch, failed testing.

serundeputy’s picture

re-roll need correct syntax.

serundeputy’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 11: user-login-fail-custom-message-2314381-4.patch, failed testing.

longwave’s picture

It 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().

serundeputy’s picture

Version: 7.x-dev » 8.0.x-dev
aneek’s picture

@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. :)

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dpi’s picture

Status: Needs work » Closed (won't fix)
Related issues: +#944550: Allow customisation of new user account creation messages

There 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.