The Arcive of vBulletin Modifications Site. |
|
Controlling a non VB page Details »»
|
|||||||||||||||||||||||||
Hi!
I currently use this code to prevent non registered users from viewing a page on my web site: PHP Code:
Thanks :banana: Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Compare the usergroupid instead. Also use require instead of include for better security.
|
|
#3
|
|||
|
|||
|
Quote:
Is the user group .. $bbuserinfo[usergroup] ???? How do you find out these variables, are they listed anywhere? Thanks for letting me know about the require, Ive changed that. |
|
#4
|
||||
|
||||
|
im actually starting on hack to make pages that are protected in this way :P. Im gonna llow thwm to be added edited and viewed via the admincp and users wil be able to use plain html or php
|
|
#5
|
|||
|
|||
|
$bbuserinfo['usergroupid'] (USE THE QUOTES!).
Code:
mysql> select usergroupid,title from usergroup; +-------------+-----------------------------------+ | usergroupid | title | +-------------+-----------------------------------+ | 1 | Unregistered / Not Logged In | | 2 | Registered | | 3 | Users Awaiting Email Confirmation | | 4 | (COPPA) Users Awaiting Moderation | | 5 | Super Moderators | | 6 | Administrators | | 7 | Moderators | | 8 | Banned by Moderators | | 9 | newforum Developers | | 10 | WDF Project Designers | +-------------+-----------------------------------+ 10 rows in set (0.19 sec) |
|
#6
|
|||
|
|||
|
Nice one guys, got that one sorted.
Last thing :lick: I use.. show_nopermission(); When they are not logged in. Because Im now also checking to see if they have authorised their email address, does vBulletin have a template to says that they need to authorise their email? show_emailauthorise(); or something! Thanks again :bandit: :bandit: |
![]() |
|
|