[wp-trac] [WordPress Trac] #19714: plugins which use the 'authenticate' hook unable to return errors
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 24 04:43:15 UTC 2012
#19714: plugins which use the 'authenticate' hook unable to return errors
--------------------------+------------------------------
Reporter: willnorris | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Comment (by nacin):
Sidebar — This code in wp_authenticate() made me think about just letting
add() get called:
{{{
$ignore_codes = array('empty_username', 'empty_password');
if (is_wp_error($user) && !in_array($user->get_error_code(),
$ignore_codes) ) {
do_action('wp_login_failed', $username);
}
}}}
My take on this code is that it should instead be checking to see if
`get_error_codes() != array( 'empty_username', 'empty_password' )`, per
the check in wp_signon(). wp_login_failed seems like a fringe hook,
though.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19714#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list