Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#49007 closed feature request (fixed)

Extend wp_login_failed action

Reported by: hamedmoodi's profile hamedmoodi Owned by: sergeybiryukov's profile 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
5 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 5 years ago by rixeo (previous) (diff)

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

#30789 was marked as a duplicate.

#7 @netweb
4 years ago

  • Milestone changed from Awaiting Review to 5.4

#8 @audrasjb
4 years ago

  • Keywords needs-dev-note added

#9 @audrasjb
4 years ago

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