2017-01-10, 04:32 AM
2017-01-10, 10:42 AM
You can get the avatar of a user using the below code :-
Regards
WallBB
{$mybb->user['avatar']}
Regards
WallBB
2017-01-10, 10:20 PM
(2017-01-10, 10:42 AM)WallBB Wrote: [ -> ]You can get the avatar of a user using the below code :-That gets the avatar of the currently logged in user, how do I get the avatar of any user given either their username or uid?
{$mybb->user['avatar']}
Regards
WallBB
2017-01-10, 10:35 PM
$query = $db->simple_select("users", "avatar", "uid=$uid");
$avatarurl = $db->fetch_field($query, "avatar");
Note that avatars don't use a full path url when uploaded;, they use a relative path.