Quote:
Originally Posted by Adrian Schneider
I could be mistaken, but I wouldn't trust $vbulletin->session->vars['styleid'] or $vbulletin->userinfo['styleid']. $styleid and STYLEID are the only one two options which represent what was actually used.
|
Yes, you're right as usual. I had looked at fetch_style_record() and it looked like $styleid was set to the same as $vbulletin->userinfo['styleid'], but I missed the fact that a plugin on hook style_fetch could change it, or it could use $vbulletin->options['styleid'] if $styleid ends up being invalid.
So just to clarify, gothicuser, Adrian's
PHP Code:
if (STYLEID == 1){
Code
}
is the way to go (no "global needed").