vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vb3 Forced login on custom page? (https://vborg.vbsupport.ru/showthread.php?t=74034)

Dolby 01-09-2005 01:00 AM

vb3 Forced login on custom page?
 
I currently have a custom vb3 page (with php) that only mods can see (using vb3 usergroupid's) however I want to force them to login again to see this page just like when they use the modcp. I cant figure out how the modcp/admincp forces users to login again otherwise I could figure it out.

I just dont want my mods logging into a friends computer and then there friends can see this page because they forgot to log out. I need a forced login every time the session expires.

I just need to be pointed in the right direction in how this is done.

Thanks. :)

rake 01-09-2005 08:30 AM

You could just log them out and make them log in again...

if($bbuserinfo['userid'])
{
header("Location: login.php?do=logout&url=this_page");
}

then use something like:

if($bbuserinfo['userid'] == 0)
{
print_no_permission();
}

however, you'd have to find a way to skip the first piece of code once they've logged in again..

Carnage 01-09-2005 11:51 AM

easy: use the global.php from the modcp instead of the one from the root forum directory; i use this on anything i write thats mods+ it also give the nice advantage of including adminfunctions for you as well.

Dolby 01-10-2005 03:36 AM

Thanks for your suggestions rake and carnage. I'll see what works better for me. I'm thinking just using the modcp global.php is going to be my best option.


All times are GMT. The time now is 01:37 AM.

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.01003 seconds
  • Memory Usage 1,707KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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