WordPress получите имя пользователя
$current_user = wp_get_current_user();
echo($current_user->user_login);
Ugliest Unicorn
$current_user = wp_get_current_user();
echo($current_user->user_login);
global $current_user;
get_currentuserinfo();
echo $current_user->user_email;
$user = get_user_by( 'email', 'user@example.com' );
$userId = $user->ID;