Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthornathan
    • CommentTimeAug 2nd 2006 edited
     # 1
    I was wondering how I could have the profiles so that other users CAN NOT acces it.

    There is ONE user/ role we do not wish to grant access to other peoples profiles.

    I hope someone can help. Thanks.
    •  
      CommentAuthornathan
    • CommentTimeAug 2nd 2006
     # 2
    <?php
    /*
    Extension Name: Private Accounts
    Extension Url: http://lussumo.com/docs/
    Description: Blocks users from a particular role from browsing user accounts.
    Version: 1.0
    Author: Nathan Wheatley
    Author Url: http://www.chiefcodemonkey.com
    */

    if ($Context->SelfUrl == 'account.php' && $Context->Session->RoleID == xx) {
    if ($AccountUser->UserID == $Context->Session->UserID) {
    } else {
    header('location:'.GetUrl($Configuration, 'index.php'));
    die();
    }
    }
    ?>


    I worked it out. You will need to change the RoleID on the first line of the first if statement.
    •  
      CommentAuthorDinoboff
    • CommentTimeAug 2nd 2006 edited
     # 3
    or something like that:
    <?php
    /*
    Extension Name: Private Accounts
    Extension Url: http://lussumo.com/docs/
    Description: Blocks unauthenticated users from browsing user accounts on a public forum.
    Version: 1.0
    Author: Mark O'Sullivan
    Author Url: http://www.markosullivan.ca/
    */

    $Context->Configuration['PERMISSION_SEE_OTHER_ACCOUNTS'] = '0';
    $Context->Dictionary['PERMISSION_SEE_OTHER_ACCOUNTS'] = 'Can see other account profiles';

    if ($Context->SelfUrl == 'account.php' &&
    ($Context->Session->UserID == 0 ||
    ( $AccountUser->UserID != $Context->Session->UserID &&
    !$Context->Session->User->Permission("PERMISSION_SEE_OTHER_ACCOUNTS")
    ))) {
    header('location:'.GetUrl($Configuration, 'index.php'));
    die();
    }
    ?>
    •  
      CommentAuthorMark
    • CommentTimeAug 2nd 2006
     # 4
    That's more like it, Dinoboff :)
    •  
      CommentAuthornathan
    • CommentTimeAug 2nd 2006
     # 5
    Thank you.

    I really had no idea what I was doing, and what I did seemed to work.

    I'll use the new one now.
    •  
      CommentAuthorWanderer
    • CommentTimeAug 2nd 2006
     # 6
    'Can see other account profiles;

    should be...

    'Can see other account profiles';

    (missing end ' )
    •  
      CommentAuthornathan
    • CommentTimeAug 3rd 2006
     # 7
    Thanks for that.

    I have to ask. What's with the green text man?
    •  
      CommentAuthorWanderer
    • CommentTimeAug 3rd 2006 edited
     # 8
    Green? Egads, I thought it was blue! Damned color-blindness!
    Seriously though, no reason, none that come to mind except that I like being creative...
    •  
      CommentAuthornathan
    • CommentTimeAug 3rd 2006
     # 9
    Fair enough. :P
    •  
      CommentAuthordroozie
    • CommentTimeAug 3rd 2006
     # 10
    I think that green text triggered a minor styling bug.

    The text which says something like 1 to 10 of 10 in the lefthand corner just below the last comment has obviously turned green on my screen. (It use to be gray.) This error only seem to show up here...
    •  
      CommentAuthorgiginger
    • CommentTimeAug 3rd 2006
     # 11
    There's nothing wrong with chaning your text colour!
    •  
      CommentAuthorWallPhone
    • CommentTimeAug 3rd 2006 edited
     # 12
    Wanderer needs to change his </green> to an </font>
    •  
      CommentAuthorWanderer
    • CommentTimeAug 3rd 2006
     # 13
     Quote: WallPhone  Wanderer needs to change his </green> to an </font>

    Oops, fixed, [embarrassed]
    •  
      CommentAuthorbugsmi0
    • CommentTimeSep 6th 2006
     # 14
    is that code above correct ? I just copied and pasted and it results in error
    parse error, unexpected '{'
    •  
      CommentAuthorDinoboff
    • CommentTimeSep 6th 2006
     # 15
    There was some missing ')'; I just added them
    • CommentAuthorfery
    • CommentTimeNov 20th 2007 edited
     # 16
    helloes,

    is this extension, 1.1.4 friendly? because i could'nt see any effect or parameters in user roles
    only that guests being redirected to the discussions-overview page.

    or is this how it should be?

    if yes, is there a way to define a url? for example a 404 page or a custom page with pagemanager.
    i'm talking about a interface solution/admin settings solution like add any url into this textfield,
    and not really about the text editor way.

    thanks
Add your comments
    Username Password
  • Format comments as