Last active
September 5, 2024 01:48
Revisions
-
norcross revised this gist
Jun 6, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ <?php add_filter ( 'authenticate', 'rkv_login_options', 20, 3 ); function rkv_login_options( $user, $username, $password ) { -
norcross revised this gist
Jun 6, 2014 . 1 changed file with 7 additions and 8 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,14 +3,13 @@ function rkv_login_options( $user, $username, $password ) { if ( is_email( $username ) ) { $user = get_user_by( 'email', $username ); } if ( $user ) { $username = $user->user_login; } return wp_authenticate_username_password( null, $username, $password ); } -
norcross created this gist
Jun 6, 2014 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ <?php add_filter ( 'authenticate', 'rkv_login_options', 20, 3 ); function rkv_login_options( $user, $username, $password ) { if ( is_email( $username ) ) { $user = get_user_by( 'email', $username ); } if ( $user ) { $username = $user->user_login; } return wp_authenticate_username_password( null, $username, $password ); }