squishi
04-16-2011, 04:59 PM
I hook into the member_build_blocks_start hook with a plugin.
I want to check if the current (logged-in) user has a custom avatar.
I already inspected the $vbulletin->userinfo object.
The only sign that I could find is "avatarid = 0" in the userinfo for my account (with a custom avatar).
So I can check if a user has a generic avatar, I suppose.
But how do I check if a user has a custom avatar?
I don't want to just add another query, btw.
--------------- Added 1302977327 at 1302977327 ---------------
Hmmm.... when snooping around on other profiles, I found
$vbulletin->userinfo['hascustomavatar']
For me as logged-in user, this variable was not set, though. That is strange, because I have a custom avatar as well.
I want to check if the current (logged-in) user has a custom avatar.
I already inspected the $vbulletin->userinfo object.
The only sign that I could find is "avatarid = 0" in the userinfo for my account (with a custom avatar).
So I can check if a user has a generic avatar, I suppose.
But how do I check if a user has a custom avatar?
I don't want to just add another query, btw.
--------------- Added 1302977327 at 1302977327 ---------------
Hmmm.... when snooping around on other profiles, I found
$vbulletin->userinfo['hascustomavatar']
For me as logged-in user, this variable was not set, though. That is strange, because I have a custom avatar as well.