Make WordPress Core

Opened 5 years ago

Last modified 4 months ago

#30789 new enhancement

wp_login_failed action hook should pass authentication errors

Reported by: mattkeys Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Login and Registration Keywords: has-patch
Focuses: Cc:
PR Number:


The wp_authenticate function fires the wp_login_failed action if authentication fails. The wp_login_failed action only has access to the username, but no information about what errors triggered the authentication failure.

It would be nice to make the results of the authenticate filter available to the wp_login_action. This function *is* pluggable, which is my current workaround for this problem. However I think it would be worth including this into core.

I have attached a diff with a solution.

Attachments (3)

wp_login_failed.diff (457 bytes) - added by mattkeys 5 years ago.
Adding the authentication errors object
30789.diff (952 bytes) - added by MikeHansenMe 5 years ago.
Add just the error instead of the whole object and minor code cleanup
30789.2.diff (1.0 KB) - added by MikeHansenMe 3 years ago.

Download all attachments as: .zip

Change History (6)

5 years ago

Adding the authentication errors object

5 years ago

Add just the error instead of the whole object and minor code cleanup

#1 @MikeHansenMe
5 years ago

  • Keywords has-patch added

#2 @MikeHansenMe
4 years ago

Patch still applies for r32523.

3 years ago


#3 @MikeHansenMe
3 years ago

Refreshed that patch since the previous one would no longer apply.

Note: See TracTickets for help on using tickets.