WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 6 weeks 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:

Description

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
thanks

Change History (9)

#1 @rixeo
4 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 4 months ago by rixeo (previous) (diff)

#2 @hamedmoodi
4 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
4 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
4 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
4 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
4 months ago

#30789 was marked as a duplicate.

#7 @netweb
3 months ago

  • Milestone changed from Awaiting Review to 5.4

#8 @audrasjb
3 months ago

  • Keywords needs-dev-note added

#9 @audrasjb
6 weeks ago

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