WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 2 years ago

#30789 new enhancement

wp_login_failed action hook should pass authentication errors

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

Description

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 4 years ago.
Adding the authentication errors object
30789.diff (952 bytes) - added by MikeHansenMe 3 years ago.
Add just the error instead of the whole object and minor code cleanup
30789.2.diff (1.0 KB) - added by MikeHansenMe 2 years ago.
Refresh

Download all attachments as: .zip

Change History (6)

@mattkeys
4 years ago

Adding the authentication errors object

@MikeHansenMe
3 years ago

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

#1 @MikeHansenMe
3 years ago

  • Keywords has-patch added

#2 @MikeHansenMe
3 years ago

Patch still applies for r32523.

@MikeHansenMe
2 years ago

Refresh

#3 @MikeHansenMe
2 years ago

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

Note: See TracTickets for help on using tickets.