vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Help figuring out is_member_of (https://vborg.vbsupport.ru/showthread.php?t=82519)

sully02 06-04-2005 10:13 PM

Help figuring out is_member_of
 
I have a snippet of code in a file that displays a message for those not in paid membership groups. The problem is, despite my attempts to code it so the paid members can't see it, they still see the message. Here's the conditional I'm currently using:

PHP Code:

if (!is_member_of($bbuserinfo18) OR !is_member_of($bbuserinfo19) OR !is_member_of($bbuserinfo20))
         {
                  
//Code I don't want paying members to see
        


However, it's not working. Can anyone help me figure out what I'm doing wrong?

Andreas 06-04-2005 11:52 PM

So you don't want to have the code displayed to members that are not in usergroup ID 18, 19 or 20?

Then use this code
PHP Code:

if (!is_member_of($bbuserinfo18) AND !is_member_of($bbuserinfo19) AND !is_member_of($bbuserinfo20))
{
    
//Code I don't want paying members to see


Boolean Algebra:

NOT (x OR y OR z) = (NOT x) AND (NOT y) AND (NOT z) => DeMorgan's Theorems

sully02 06-05-2005 02:47 AM

Quote:

Originally Posted by KirbyDE
So you don't want to have the code displayed to members that are not in usergroup ID 18, 19 or 20?

Then use this code
PHP Code:

if (!is_member_of($bbuserinfo18) AND !is_member_of($bbuserinfo19) AND !is_member_of($bbuserinfo20))
{
    
//Code I don't want paying members to see


Boolean Algebra:

NOT (x OR y OR z) = (NOT x) AND (NOT y) AND (NOT z) => DeMorgan's Theorems

Wow, I wasn't aware of that one. Then again, I haven't taken any logic classes yet. I figured using AND for all 3 would do a check to see if a user was in all 3 usergroups.


All times are GMT. The time now is 10:27 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.01446 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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