1 $current_user = wp_get_current_user();
2
3 echo 'Username: ' . $current_user->user_login . '<br />';
4 echo 'User email: ' . $current_user->user_email . '<br />';
5 echo 'User first name: ' . $current_user->user_firstname . '<br />';
6 echo 'User last name: ' . $current_user->user_lastname . '<br />';
7 echo 'User display name: ' . $current_user->display_name . '<br />';
8 echo 'User ID: ' . $current_user->ID . '<br />';