Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Hi,
I'm working on a plugin that needs to grab the users avatar. Currently, I'm also working with a membership plugin, and we verify if the "account" is verified like this:
'user_confirmed' => $user->pmpro_email_confirmation_key,
Is there any equivalent to get the avatar url for someone?
I've tried:
'avatar' => $wpforo_profiles->avatar
or
'avatar' = $user->data->avatar
but both are coming back null.
Any help would be great!
To further clarify, here's some other examples that are working. For example, to get the user name:
'name' => $user->data->user_nicename
Thanks!
Solved through global $wpdb
You can use this code to get user avatar by UserID:
<?php echo WPF()->member->get_avatar($userid); ?>