Different function to get differents users information
<?php
$user_id = get_current_user_id();
$user_post_count = count_user_posts( $user_id );
$user_nicename = get_the_author_meta( 'user_nicename' );
$user_info = get_userdata($user_id);
$user_pseudo = $user_info->user_nicename; //Used for auth-key
$user_meta = get_user_meta( $user_id );
$user_email = $user_info->user_email;
$user_login =$user_info->user_login;
try{
$user_roles = implode(', ', (array)($user_info->roles));
} catch (Exeption $e) {
echo 'Exception for the impldode : ', $e->getMessage(), "\n";
}
?>