PDA

View Full Version : PHP code to do this?


Prince
09-08-2019, 02:58 AM
Make it so only users logged in see something?

Dave
09-08-2019, 11:28 AM
if($vbulletin->userinfo['userid'] <= 0){
// Not logged in
} else {
// Logged in
}

If you want to do it in a template then it depends on the template, but generally something like
<vb:if condition="$bbuserinfo['userid'] <= 0">
Not logged in
<vb:else />
Logged in
</vb:if>

Prince
09-08-2019, 03:58 PM
If you want to do it in a template then it depends on the template, but generally something like
<vb:if condition="$bbuserinfo['userid'] <= 0">
Not logged in
<vb:else />
Logged in
</vb:if>

Thank you, worked perfectly!