WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 weeks ago

#30789 closed enhancement (duplicate)

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:

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 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 4 years ago.
Refresh

Download all attachments as: .zip

Change History (7)

@mattkeys
5 years ago

Adding the authentication errors object

@MikeHansenMe
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
5 years ago

Patch still applies for r32523.

@MikeHansenMe
4 years ago

Refresh

#3 @MikeHansenMe
4 years ago

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

#4 @SergeyBiryukov
5 weeks ago

  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the ticket, sorry it took so long for someone to get back to you.

This is now fixed in [46971] / #49007.

Note: See TracTickets for help on using tickets.