View Full Version : restrict access to a PHP file for certain usergroups?? how to?
Hi guys,
I recently added a php file to my vB and gave out a link to all members. I would like to restrict the access to that file to only members (or people who have logged in).
Can you folks help me figure out how to do this?
thank you in advance.
Link14716
03-11-2005, 12:18 AM
Hi guys,
I recently added a php file to my vB and gave out a link to all members. I would like to restrict the access to that file to only members (or people who have logged in).
Can you folks help me figure out how to do this?
thank you in advance.
Only logged in users?
if ($bbuserinfo['userid'] == 0) {
print_no_permission();
}
Jolten
03-11-2005, 07:42 AM
or
if (!$bbuserinfo['userid']) {
print_no_permission();
}
Bad Bunny
09-04-2005, 07:56 AM
I know this is an older thread, but hey. Since my question is so similar, I figured it would be helpful to have them together in the same thread.
How would I limit the page to particular usergroups? I would need it to recognize primary as well as secondary usergroups.
Adrian Schneider
09-04-2005, 08:45 AM
// users not in X AND not in Y will be denied access
if (!is_member_of($bbuserinfo, X) AND !is_member_of($bbuserinfo, Y))
{
print_no_permission();
}
Bad Bunny
09-04-2005, 09:02 AM
// users not in X AND not in Y will be denied access
if (!is_member_of($bbuserinfo, X) AND !is_member_of($bbuserinfo, Y))
{
print_no_permission();
}
Thanks!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.