Permissions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • InSite
    Senior Member
    • Aug 2002
    • 267

    Permissions

    I am using the vB usergroup ID to verify access to a certain part of my website - something which will become much easier once VB3 is out thanks to the ability to put users in multiple groups...

    Anyways - I am stuck on how to add more than one user or group to the verify code... What I currently have is this:

    PHP Code:
    if ($bbuserinfo['userid'] != 1) { 
    That will allow only me (as the first user) access to whatever follows. However, without using usergroupid, how can I add more users to this check, preferably based on user numbers?

    for example, userid 1, 3, 17, 20 can access.

    Thanks
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    PHP Code:
    [font=Courier New][color=#006600]if (($bbuserinfo['userid'] != 1) && ($bbuserinfo['userid'] !=2 )) {[/color][/font] 

    Comment

    • Floris
      Senior Member
      • Dec 2001
      • 37767

      #3
      WHY the hell did vb3 put color stuff html crap around it
      LOL :/ :\ :[ :r


      if ( (condition) && (condition) ) {

      Comment

      • InSite
        Senior Member
        • Aug 2002
        • 267

        #4
        Originally posted by xiphoid
        PHP Code:
        [font=Courier New][color=#006600]if (($bbuserinfo['userid'] != 1) && ($bbuserinfo['userid'] !=2 )) {[/color][/font] 
        Thanks very much

        Comment

        • Icheb
          Senior Member
          • Nov 2002
          • 1291

          #5
          PHP Code:
          $test=array('1','2','3');
          if(
          in_array($bbuserinfo['userid'],$test)) {
             
          things only some special people have permission to see


          Comment

          • InSite
            Senior Member
            • Aug 2002
            • 267

            #6
            Originally posted by Icheb
            PHP Code:
            $test=array('1','2','3'); 
            if(
            in_array($bbuserinfo['userid'],$test)) { 
            things only some special people have permission to see 


            Oooh - neat - thanks also

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...