Skip to content

Instantly share code, notes, and snippets.

@maina66
maina66 / functions.php
Created February 1, 2026 11:30 — forked from ovizii/functions.php
Login with email
function login_with_email_address($username) {
$user = get_user_by('email',$username);
if(!empty($user->user_login))
$username = $user->user_login;
return $username;
}
add_action('wp_authenticate','login_with_email_address');
function change_username_wps_text($text){
if(in_array($GLOBALS['pagenow'], array('wp-login.php'))){