xxxxxxxxxx
$current_user = wp_get_current_user();
echo($current_user->user_login);
xxxxxxxxxx
<?php $user_info = get_userdata(1);
echo $user_info->last_name . ", " . $user_info->first_name . "\n";
?>
xxxxxxxxxx
$current_user_id = get_current_user_id();
$current_user = wp_get_current_user();
xxxxxxxxxx
$username = 'your user name';
$user = get_user_by('login', $username);