Make WordPress Core


Ignore:
Timestamp:
01/24/2008 06:32:21 PM (17 years ago)
Author:
ryan
Message:

Add wp_login_failed action

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r6643 r6647  
    434434    $user = get_userdatabylogin($username);
    435435
    436     if ( !$user || ($user->user_login != $username) )
     436    if ( !$user || ($user->user_login != $username) ) {
     437        do_action( 'wp_login_failed', $username );
    437438        return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Invalid username.'));
    438 
    439     if ( !wp_check_password($password, $user->user_pass) )
     439    }
     440
     441    if ( !wp_check_password($password, $user->user_pass) ) {
     442        do_action( 'wp_login_failed', $username );
    440443        return new WP_Error('incorrect_password', __('<strong>ERROR</strong>: Incorrect password.'));
     444    }
    441445
    442446    // If using old md5 password, rehash.
Note: See TracChangeset for help on using the changeset viewer.