Is there a simple function/script to get the avatar/url of a message recipient?
For instance, let's say user A sends a private message to user B.
In user A's message list, it now displays user A's avatar + message excerpt, enabling user A to click on the excerpt to view the message that he sent.
When user A goes inside to view the message thread he started, user A is able to see his own information (metadata such as date sent, message content, his own avatar), however is not able to see the avatar/info of who he sent the message to.
Essentially the basic message template currently looks like this:
- User A Avatar - User A Nicename/url
Date Sent
Message Contents
However I'm trying to get it like this:
- User A Avatar - User A Nicename/url
- Date Sent
User B Avatar- User B Nicename/url (the message recipient)
Message Contents
I know how to get the avatar/url for the message author however I can't figure out how to get the avatar/url for the message recipient
Does anyone have any suggestions for how to do this?
get_userdata()
function.