Log in

View Full Version : IF Issues


Kirk Y
05-29-2006, 03:50 AM
Hey gents. If you wouldn't mind, I'd appreciate it if someone could take a look at this and see if they can figure out why it's not working.

if ($_REQUEST['do'] == 'admin')
{
if (is_member_of($bbuserinfo, 6)){
eval('print_output("' . fetch_template('blast_admin') . '");');
}
else
{
eval(standard_error(fetch_error('perms')));
}
}
else
{
eval('print_output("' . fetch_template('blast_post_message') . '");');
}

When I (Admin) test it out, I'm always satisfying the second ELSE -- but I should be qualifying the first IF statement. I'd imagine its got something to do with my IF nesting.

Adrian Schneider
05-29-2006, 04:08 AM
Use $vbulletin->userinfo instead of $bbuserinfo. $bbuserinfo is only available in older versions or in templates. Also, you may want to try using print_no_permission(); instead of fetching the 'perms' error.

Kirk Y
05-29-2006, 04:16 AM
Thanks again SirAdrian -- don't mean to bug, lol... but I suppose this is how one learns. :classic:

Oh, I thought sure there was a permission error already existant in vB, but I was too lazy to go find it, so I figured why not use something I knew.