Fetch Avatar by userID?
I'm building a sidebar element that needs to show the avatars of a bunch of users selected by an assortment of rules.
My SQL is pulling in the appropriate users, but surely there's a call to get the image code based on a userID.
My searches on this site have not been fruitful.
I see a method in memberlist.php, but was hoping for something a bit simpler.
I can tweak my query to get the avatar/custom avatar path, but I'd like to follow best practices.
--------------- Added [DATE]1337628697[/DATE] at [TIME]1337628697[/TIME] ---------------
So here's what I ended up doing:
(My query only returns users with avatars)
If the user.avatarid >0 then I use the path from avatar.avatarpath
If the user.avatarid =0 then image.php?u=userID&dateline=D
where D = customavatar.dateline
|