$current_user = wp_get_current_user();
/**
* @example Safe usage: $current_user = wp_get_current_user();
* if ( !($current_user instanceof WP_User) )
* return;
*/
echo 'Username: ' . $current_user->user_login . '
';
echo 'User email: ' . $current_user->user_email . '
';
echo 'User first name: ' . $current_user->user_firstname . '
';
echo 'User last name: ' . $current_user->user_lastname . '
';
echo 'User display name: ' . $current_user->display_name . '
';
echo 'User ID: ' . $current_user->ID . '
';
No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.