Make WordPress Core

Opened 22 months ago

Closed 22 months ago

Last modified 19 months ago

#49007 closed feature request (fixed)

Extend wp_login_failed action

Reported by: hamedmoodi Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Login and Registration Keywords: has-dev-note
Focuses: Cc:


currently when login failed trigger developer can not find out what happened that trigger this error.
its better developer can find out what happen for some operation such as security log, or notification and ...

although developer can rewrite authenticate function but its good for general wordpress operations.

my offer is add $user to wp_login_failed action for control errors in

Change History (9)

#1 @rixeo
22 months ago

I don't think the $user object can be added as at this point authentication has failed, so technically there is no user object

Last edited 22 months ago by rixeo (previous) (diff)

#2 @hamedmoodi
22 months ago

login failed may be trigger when password is incorrect or captcha code is not valid or another resosn that user exists but can not validate another params

#3 @rixeo
22 months ago

At the point the action wp_login_failed is called, the user object is a WP_Error object, passing it as a parameter will be passing the error object

#4 @hamedmoodi
22 months ago

Yes, i this WP_Error object keep error(s) that happended such as invalid captcha.
i want exactly WP_Error for analyze what error happened

#5 @SergeyBiryukov
22 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 46971:

Login/Registration: Pass the error data to the wp_login_failed action.

Props hamedmoodi, rixeo.
Fixes #49007.

#6 @SergeyBiryukov
22 months ago

#30789 was marked as a duplicate.

#7 @netweb
21 months ago

  • Milestone changed from Awaiting Review to 5.4

#8 @audrasjb
20 months ago

  • Keywords needs-dev-note added

#9 @audrasjb
19 months ago

  • Keywords has-dev-note added; needs-dev-note removed
Note: See TracTickets for help on using tickets.