PDA

View Full Version : Trying to figure out if user has specified avatar


brandondrury
16 Mar 2007, 06:43
Hello,

I was wondering if anyone could tell me where I could find the database table / column that tells if an avatar has been set by the user.

I've found that if I try to snag the avatar using the following method from a member who does not have an avatar, I get some default vBulletin image.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Because vBulletin still returns an image, I haven't figured out how to right a php IF statement for this. It seams I need to figure it out from the database.

Brandon

WhaLberg
16 Mar 2007, 11:43
If I am not wrong you want to check if a user has an avatar or not.

You can go to avatar or customavatar fields to see whether a user has an avatar or not.

brandondrury
16 Mar 2007, 19:51
Any idea what table those would be under?

I checked the user table and didn't find any values for any of the avatar fields even though many of the users have avatars.

Brandon

Okay, I found it. It's under the "customavatar" table.

Brandon

WhaLberg
16 Mar 2007, 20:29
I told that in my first post.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Brad
16 Mar 2007, 20:50
Use this script;



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



and this in the template in question;



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------