CEMarijn
03-13-2009, 01:38 PM
Hi all,
I have a small question concerning custom php code. I want to include a link to a php file on my forum that everyone can see. This php script should then check if the user is logged in. If he is, he is redirected to the content. If not, he gets a message that he does not have permission.
I found the following code (this example should only work for admins), but that does not work.
<?php
if ($vbulletin->userinfo['usergroupid'] == '6' )
{
echo "Welcome to the premium section!";
} else {
echo "You do not have permission for this page"; }
?>
I outputted the usergroupid variable, but it is just empty. I am completely new to vbulletin, so this might be a very noobish question. But please help :) Thanks in advance!
I have a small question concerning custom php code. I want to include a link to a php file on my forum that everyone can see. This php script should then check if the user is logged in. If he is, he is redirected to the content. If not, he gets a message that he does not have permission.
I found the following code (this example should only work for admins), but that does not work.
<?php
if ($vbulletin->userinfo['usergroupid'] == '6' )
{
echo "Welcome to the premium section!";
} else {
echo "You do not have permission for this page"; }
?>
I outputted the usergroupid variable, but it is just empty. I am completely new to vbulletin, so this might be a very noobish question. But please help :) Thanks in advance!