![]() |
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. :) |
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.. |
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.
|
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 12:32 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|