Online Forum To Support Coders With Technical Assistance - Read Write Execute

How to get user details from id in wordpress

Ankit Agrawal
Ankit Agrawal
Published on July 15, 2015 · 1 min read
$user_id = 1;
$filed = "id"; // you can also use email/slug/login
$aUser = get_user_by( $filed , $user_id );
print_r($aUser);
Was this article helpful?
Ankit Agrawal

Ankit Agrawal

Author & Senior Engineer at CodeExecute

Writing practical engineering guides, debugging real-world bottlenecks, and creating free tools for developer productivity.

← Previous Article how to delete value from array in php Next Article → How to submit a form on a tag click