vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Controlling a non VB page (https://vborg.vbsupport.ru/showthread.php?t=50801)

stuuu 03-25-2003 02:59 PM

Controlling a non VB page
 
Hi!

I currently use this code to prevent non registered users from viewing a page on my web site:

PHP Code:

include ("global.php");
if (
$bbuserinfo[userid]==0) {
    
show_nopermission();


How could I improve that code so it doesnt allow users that have registered BUT have not confirmed their email address to view the page. So if they try to access the page, it displays the message saying they need to activate their account first.

Thanks :banana:

filburt1 03-25-2003 03:40 PM

Compare the usergroupid instead. Also use require instead of include for better security.

stuuu 03-26-2003 12:34 AM

Quote:

Yesterday at 05:40 PM filburt1 said this in Post #2
Compare the usergroupid instead. Also use require instead of include for better security.

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.

colicab-d 03-26-2003 08:36 AM

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 :D

filburt1 03-26-2003 02:15 PM

$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)


stuuu 03-26-2003 09:18 PM

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:


All times are GMT. The time now is 09:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01682 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete