Using the get_userdata function
-
Hi all
I am not sure if this is the proper function I need to use for what I’m trying to do.
I have read the info in the Codex about get_userdata function but am still unclear on how to implement it or if this is the correct function I should be using.
I need to be able to display the username of a private message recipient (I know this is not a built in WP feature, I am trying to add on to an incomplete plugin that I am using).
I know how to get the info of the message author but have troubles getting the info of the recipient.
The Codex examples clearly show how to pull the data for a specific user
ie
<?php $user_info = get_userdata(1);
pulls the specified data for user 1However I don’t need to specify a single user, I need it to be, I guess a “blanket statement” where it will pull the info of whoever the specific message recipient is.
Am I going in the completely wrong direction thinking to use get_userdata function for this? Any suggestions on how I can accomplish what I’m trying to do? How can I use this function to pull the data for any user, not just one specific user?
- The topic ‘Using the get_userdata function’ is closed to new replies.