Changeset 12853
- Timestamp:
- 01/26/2010 08:25:34 PM (15 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-functions.php
r12852 r12853 1888 1888 } 1889 1889 1890 function login_spam_check( $user, $password ) {1891 if ( is_user_spammy( $user->ID ) )1892 return new WP_Error('invalid_username', __('<strong>ERROR</strong>: your account has been marked as a spammer.'));1893 return $user;1894 }1895 add_action( 'wp_authenticate_user', 'login_spam_check', 10, 2 );1896 1897 1890 function update_blog_public( $old_value, $value ) { 1898 1891 global $wpdb; -
trunk/wp-includes/user.php
r12766 r12853 84 84 } 85 85 86 $userdata = get_user databylogin($username);87 88 if ( !$userdata ) {86 $userdata = get_user_by('login', $username); 87 88 if ( !$userdata ) 89 89 return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); 90 } 90 91 if ( is_multisite() && (1 == $userdata->spam) ) 92 return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Your account has been marked as a spammer.')); 91 93 92 94 $userdata = apply_filters('wp_authenticate_user', $userdata, $password); 93 if ( is_wp_error($userdata) ) {95 if ( is_wp_error($userdata) ) 94 96 return $userdata; 95 } 96 97 if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) { 97 98 if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) 98 99 return new WP_Error('incorrect_password', sprintf(__('<strong>ERROR</strong>: Incorrect password. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); 99 }100 100 101 101 $user = new WP_User($userdata->ID);
Note: See TracChangeset
for help on using the changeset viewer.