Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Private Profiles.
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.
There is ONE user/ role we do not wish to grant access to other peoples profiles.
I hope someone can help. Thanks.
0
This discussion has been closed.
Comments
<?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.
<?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(); } ?>
I really had no idea what I was doing, and what I did seemed to work.
I'll use the new one now.
should be...
'Can see other account profiles';
(missing end ' )
I have to ask. What's with the green text man?
Seriously though, no reason, none that come to mind except that I like being creative...
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...
</green>
to an</font>
Oops, fixed, [embarrassed]
parse error, unexpected '{'
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