vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Permissions code issue with 3.6.x (https://vborg.vbsupport.ru/showthread.php?t=175099)

transparent 04-04-2008 04:05 AM

Permissions code issue with 3.6.x
 
Hello,

I have been attempting to use this hack by Erwin that hasn't been updated for 3.6.X. It works perfect for the exception of the permissions. I'm not sure if this is the correct spot for this post but I will try it anyways.

The code for the permissions is provided below. This was working in 3.5 but I'm guessing something was changed in 3.6 that broke it. Does anyone know what the correct code would be to pull permissions to view the specific page? It does pull permissions as of now but it will deny all usergroups instead of allow all the specified.

Quote:

if (!in_array($bbuserinfo['usergroupid'], array(2,5,6,7))) print_no_permission();
Thank you so much for your time!:)

Dismounted 04-04-2008 04:49 AM

PHP Code:

if (is_member_of($vbulletin->userinfo2567))
{
    
print_no_permission();



Lynne 04-04-2008 02:50 PM

Except it's a NOT in array. So, put an "!" before it, like "!is_member_of"

transparent 04-04-2008 06:53 PM

Wow...works perfect! Thank you both so much:D

Dismounted 04-05-2008 05:28 AM

Quote:

Originally Posted by Lynne (Post 1482890)
Except it's a NOT in array. So, put an "!" before it, like "!is_member_of"

My bad, I didn't see the exclamation mark :p.


All times are GMT. The time now is 08:37 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.00935 seconds
  • Memory Usage 1,719KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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