WordPress.org

Make WordPress Core

Changeset 10455


Ignore:
Timestamp:
01/28/2009 10:11:49 PM (11 years ago)
Author:
westi
Message:

Don't show the error on normal login page loads. See #8938.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r10437 r10455  
    427427    $user = apply_filters('authenticate', null, $username, $password);
    428428
    429     if ($user == null) {
     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 {
    430434        // TODO what should the error message be? (Or would these even happen?)
    431435        // Only needed if all authentication handlers fail to return anything.
    432436        $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
     437        }
    433438    }
    434439
  • trunk/wp-includes/user.php

    r10437 r10455  
    6767    if ( is_a($user, 'WP_User') ) { return $user; }
    6868
    69     // XXX slight hack to handle initial load of wp-login.php
     69    // TODO slight hack to handle initial load of wp-login.php
    7070    if ( (empty($username) && empty($password)) && $GLOBALS['pagenow'] == 'wp-login.php' ) {
    7171        return $user;
Note: See TracChangeset for help on using the changeset viewer.