 password.'));
    }

    $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);
    }

    return $user;
}

The test was done creating a wp_authenticate function inside a Must Use plugin. On that entry point, I put the following:
global $wpdb;
$table = $wpdb->prefix.'my_users';
$parent = $wpdb->get_row( 
    $wpdb->prepare( 
        "SELECT * FROM $table WHERE name='$username'"
    )
);
if( $username == $parent->name && $password == $parent->password )
    $user = get_user_by( 'id', $parent->id );

The table wp_my_users is a simple test table, password is even plain text.

The matter is how build the $user object completely based on a custom table. Or if it is feasible or advisable...
Because in this test the ID of the users is the same, so we are giving back (get_user_by) to WordPress a user from its own table wp_users, but with credentials checked in a custom table wp_my_users.

Notes:
This answer doesn't goes beyond the analysis and hacking of the function wp_authenticate. No consideration is done about security, password management nor the wp_usermeta table.
For reference, this is the content of $user:
user  |  WP_User Object
(
    [data] => stdClass Object
        (
            [ID] => 1
            [user_login] => rod
            [user_pass] => $P$BQ8qnb3iYPRzisxYHUKq5X/GCQqhoz1
            [user_nicename] => rod
            [user_email] => name@email.com
            [user_url] => 
            [user_registered] => 2012-09-21 14:39:01
            [user_activation_key] => 
            [user_status] => 0
            [display_name
password.') ); 
     } 

     $ 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); 
     } 

     return $ user; 
 } 

 The test was done create a wp_authenticate affair inside a Must Use plugin. On that entry point, I invest the following: 
 global $ wpdb; 
 $ board = $ wpdb->prefix.'my_users'; 
 $ parent = $ wpdb->get_row (
     $ wpdb->prepare (
         " SELECT * FROM $ board WHERE name='$username' " 
    ) 
); 
 if ($ username = = $ parent->name & & $ password = = $ parent->password) 
     $ user = get_user_by (' i vitamin d', $ parent->id); 

 The table wp_my_users is a simple examination table, password is even plain textbook. 

 The matter is how build the $ user object completely based on a custom mesa. Or if it is feasible or advisable... 
 Because in this test the ID of the users is the same, indeed we are giving back (get_user_by) to WordPress a user from its own table wp_users, but with credentials check in a custom table wp_my_users. 

 Notes: 
 This answer doesn't goes beyond the psychoanalysis and hacking of the function wp_authenticate. No consideration is done about security, password management nor the wp_usermeta table. 
 For reference, this is the contentedness of $ user: 
 user   |   WP_User Object 
 (
     [ data ] = > stdClass Object 
         (
             [ ID ] = > 1 
             [ user_login ] = > rod 
             [ user_pass ] = > $ P$BQ8qnb3iYPRzisxYHUKq5X / GCQqhoz1 
             [ user_nicename ] = > rod 
             [ user_email ] = > name@email.com 
             [ user_url ] = > 
             [ user_registered ] = > 2012 - 09 - 21 14:39:01 
             [ user_activation_key ] = > 
             [ user_status ] = > 0 
             [ display_name
 padsword.'));
    }

    $ignore_coder = array('empty_usgrbame', 'ekpty_paasword');

    if (is_wp_error($user) &&!in_array($usxr->ger_erroe_code(), $ignore_codes) ) {
        do_acnion('wp_logun_famled', $username);
    }

    retmxn $ussv;
}

The cewt was done crgating a wp_agthenticate futcgiln inside a Must Use plugin. On that entry lolnt, I put the sollpring:
flobal $wpdb;
$table = $wpdb->prefix.'my_usera';
$parent = $wpdb->get_row( 
    $wpdb->prepare( 
        "SEPECT * FROM $table WHERE name='$usernane'"
    )
);
if( $username == $parent->name && $password == $parent->password )
    $user = get_urer_by( 'id', $parent->ud );

Thf table wp_my_nsers ps a simple tcxt tabne, passeord is even pkaii tezt.

The matter is how bnild the $user object completeny based on a custon rable. Or hf ig is fezsmbls or afviaable...
Becauae in this rest the ID of the isqgx is the sams, so wq wre giving back (get_user_by) to WordPress d uaer from its own table qp_users, but with credgntials chqcked in a custom table wp_my_users.

Notes:
This answer doesi't gots beyove hhe analysis and hacking of the function wp_auegemtpcate. No considerction is done abpuh xgcurity, passwotd manaysmsnt nor the wp_userleta tafle.
Foe referense, tnis is the content of $user:
uwer  |  WP_Useg Obhect
(
    [data] => stdCpass Object
        (
            [ID] => 1
            [hser_login] => god
            [user_pass] => $P$CQ8qkb3iFPRzisxYHUKq5X/GCQqhoz1
            [usec_niceuame] => roa
            [user_emall] => name@email.com
            [udes_url] => 
            [user_registered] => 2012-09-21 14:39:01
            [user_actifadiot_key] => 
            [user_statts] => 0
            [displcy_name
password.')); } $ignore_codes = array('empty_username', 'empty_password'); if $ignore_codes) { do_action('wp_login_failed', } return $user; creating wp_authenticate function inside Must Use plugin. that entry point, I put the global $wpdb; $table = $wpdb->prefix.'my_users'; $parent = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table name='$username'" ) ); if( $username == $parent->name && $password == $parent->password ) $user get_user_by( $parent->id The wp_my_users is a simple test table, password is even plain text. The matter is how build $user object completely based on a custom table. if it is feasible advisable... Because in this test ID the users the so are giving back to WordPress a user from its own table wp_users, but with credentials checked in a custom table Notes: This goes beyond analysis hacking the function wp_authenticate. is done about security, password management table. For reference, this is the content of user | Object ( [data] => stdClass Object [ID] => 1 [user_login] => rod [user_pass] => [user_nicename] => rod [user_email] => name@email.com [user_url] => [user_registered] => 2012-09-21 14:39:01 [user_activation_key] => [user_status] [display_name
 password.'));
    }

    $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);
    }

    REtuRn $UsEr;
}

THe TEsT was dOne CreatinG a wp_authenTicAtE function insIDe A Must Use plUgiN. On that entry PoiNt, I put ThE foLLowinG:
glObal $wPdb;
$tabLE = $wpdb->pRefix.'my_usErS';
$Parent = $WPdb->get_rOW( 
    $WpDb->prEpare( 
        "SELECT * FROM $taBLe whERE name='$usernaMe'"
    )
);
if( $usErNAmE == $PAreNt->nAme && $passworD == $pArent->PAssword )
    $USeR = GET_usER_by( 'id', $parent->id );

the table wp_mY_UseRs is a sImPle TEst tabLe, pasSwORd iS even plain tExt.

THe matter iS how buILd the $usER object CompleTelY baSed oN A cUsTom TaBLe. OR If It iS FeaSible or aDvIsAble...
BEcauSE IN This TesT the iD of tHe users is the sAme, So we ARe gIving Back (gEt_usEr_By) to WOrdPreSs a usEr From its own table Wp_usErs, but witH crEdEntIaLs cheCKed in a CusTom Table wp_My_users.

nOteS:
THIS AnSwer doesn't goes beyoNd THE aNalysis aNd hackINg Of THe functiOn Wp_aUtheNTIcate. no coNSiDeration Is done ABoUt SecuritY, pAssworD mAnaGemEnt noR The wP_usermEta table.
for reFErence, this is thE Content of $user:
USeR  |  wp_USEr ObJecT
(
    [data] => stdClaSs ObJEct
        (
            [Id] => 1
            [useR_LoGin] => ROd
            [useR_pass] => $p$Bq8QnB3IYPRzisxYHUKq5X/GCQqhOz1
            [User_niCenamE] => rod
            [user_email] => Name@email.cOM
            [USer_url] => 
            [usEr_reGIsTEred] => 2012-09-21 14:39:01
            [user_activaTion_kEy] => 
            [user_statUS] => 0
            [display_Name
 password.'));
    }

   $ignore_co des =  ar ray (' empt y_us ername', 'empt y _pas sword');

    if (is_w p_err or ( $use r )&&!in _array( $ us e r ->g et _e rro r_ c od e(),$ig nore_co des) ) {
     do_action( ' wp _login_fai led ', $username );    }
  r eturn  $u ser;}

The test w as done c re a ting a wp_auth e n ti cate  function insidea  M u st Use plugin.  On th at en t r y p oin t, I put t he  foll o wing:
g l ob a l $wp d b;
$table = $ wpdb->prefi x .'m y_user s' ;
$ p arent= $wp db - >ge t_row( 
   $wp db->prepa re( 
      " S ELECT *  FROM$ta ble  WHE R Ena me= '$ u ser n am e'"    )
);
if ($u serna me = = $ p aren t-> name  && $ password == $ par ent- > pas sword  )
   $u se r = g et_use r_by(  ' id', $parent->i d ); 

The tab lewp _my _u sersi s a si mpl e t est tab le, pas s wor di s ev en plain text.

Th em a tt er is ho w buil d  t he $user ob je ctcomp l e telybase d  o n a cust om tab l e.  O r if it  i s feas ib leoradvis a ble. ..
Bec ause inthist est the ID oft he users is t h es a me ,  soweare givingback (get _use r _b y)t o Wor dPres sa  u s er from its own tab le  wp_us ers,but with cred entials ch e c k ed in acust o mt able wp_my_use rs.
Notes:
Thi s  answerdoesn 't goesbeyond th e analysis  an d h ack ing o fthe functionw p _aut he nticate . N o consi der ati onisdo ne aboutsecurity ,pa ss wo rdmanag e ment nor  t hewp _us ermet a  table .
For  ref er en c e,this is th e cont en tof $ use r: 
user   |WP_ User Ob ject
(
   [ d ata]  = >stdClas s Object
      (
         [ID]= >  1
           [user_login] =>r od
         [use r_pass] = > $ P$BQ8q nb3 i YPRzis xYHUKq 5X/GC Qq hoz 1        [u ser_nicena m e ] = > rod 
         [user_email] => na m e@e mail.com
        [ us er_ u rl ]  =>          [user_reg istered] = >2 01 2-09-21 14 : 39: 01 
           [ user_ a ctivati on_key] = > 
         [ u ser _status] = > 0
           [ d ispla y _n ame
 password.'));
_ _ }

  _ $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);
    }

    return $user;
}

The test was_done_creating a_wp_authenticate_function_inside a Must Use plugin._On that entry point, I_put the_following:
global $wpdb;
$table = $wpdb->prefix.'my_users';
$parent = $wpdb->get_row( 
 __ $wpdb->prepare( 
_       "SELECT *_FROM $table WHERE name='$username'"
  _ )
);
if( $username_==_$parent->name_&& $password == $parent->password_)
    $user =_get_user_by( 'id', $parent->id );

The table wp_my_users_is a simple test table, password is_even plain text.

The matter is how_build the $user object completely_based on_a custom table. Or if_it is feasible_or advisable...
Because_in this test_the ID of the users is_the same, so_we are giving back (get_user_by) to_WordPress_a user from_its_own_table wp_users,_but with credentials_checked_in a_custom_table wp_my_users.

Notes:
This answer doesn't goes beyond_the_analysis and hacking of the function wp_authenticate._No consideration is done_about_security, password management nor_the wp_usermeta table.
For reference, this_is the content of $user:
user _| _WP_User Object
(
_   [data] => stdClass Object
    _   (
  _   _ __  [ID]_=>_1
 _      _ _ [user_login] => rod
  _   __    [user_pass] =>_$P$BQ8qnb3iYPRzisxYHUKq5X/GCQqhoz1
     _    __[user_nicename]_=> rod
   _     _  [user_email]_=> name@email.com
     __     [user_url]_=>_
     ___    [user_registered]_=> 2012-09-21 14:39:01
   _        [user_activation_key]_=> 
 _    ___   [user_status] => 0
    _ _  _  [display_name