Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years 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
2 years 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 2 years ago by rixeo (previous) (diff)

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

#30789 was marked as a duplicate.

#7 @netweb
2 years ago

  • Milestone changed from Awaiting Review to 5.4

#8 @audrasjb
2 years ago

  • Keywords needs-dev-note added

#9 @audrasjb
2 years ago

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