Skip to content

Instantly share code, notes, and snippets.

@teolopez
Created December 4, 2013 20:54
Show Gist options
  • Save teolopez/7795349 to your computer and use it in GitHub Desktop.
Save teolopez/7795349 to your computer and use it in GitHub Desktop.
WordPress Current user
<?php global $current_user;
// get_currentuserinfo();
// echo 'Username: ' . $current_user->user_login . "\n";
// echo 'User email: ' . $current_user->user_email . "\n";
// echo 'User first name: ' . $current_user->user_firstname . "\n";
// echo 'User last name: ' . $current_user->user_lastname . "\n";
// echo 'User display name: ' . $current_user->display_name . "\n";
// echo 'User ID: ' . $current_user->ID . "\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment