Changeset 10463
- Timestamp:
- 01/29/2009 09:30:16 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r10461 r10463 427 427 $user = apply_filters('authenticate', null, $username, $password); 428 428 429 if ( ($user == null ) ) { 430 // TODO slight hack to handle initial load of wp-login.php 431 if ( empty($username) && empty($password) && ($GLOBALS['pagenow'] == 'wp-login.php' ) ) { 432 $user = new WP_Error('',''); //No Error 433 } else { 429 if ( $user == null ) { 434 430 // TODO what should the error message be? (Or would these even happen?) 435 431 // Only needed if all authentication handlers fail to return anything. 436 432 $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.')); 437 }438 433 } 439 434 -
trunk/wp-includes/user.php
r10455 r10463 51 51 $user = wp_authenticate($credentials['user_login'], $credentials['user_password']); 52 52 53 if ( is_wp_error($user) ) 53 if ( is_wp_error($user) ) { 54 if ( $user->get_error_codes() == array('empty_username', 'empty_password') ) { 55 $user = new WP_Error('', ''); 56 } 57 54 58 return $user; 59 } 55 60 56 61 wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie); … … 66 71 function wp_authenticate_username_password($user, $username, $password) { 67 72 if ( is_a($user, 'WP_User') ) { return $user; } 68 69 // TODO slight hack to handle initial load of wp-login.php70 if ( (empty($username) && empty($password)) && $GLOBALS['pagenow'] == 'wp-login.php' ) {71 return $user;72 }73 73 74 74 if ( empty($username) || empty($password) ) {
Note: See TracChangeset
for help on using the changeset viewer.