Allow super user to view private profiles
Permalink
Ok so I used a mod by Flight643 to make profiles private but this also blocks the super user and administrators so I am wondering how would I allow them to still see the other profiles?
Here is the code pasted in:
and then at the bottom of the page close out the if statement and scold them for snooping around :)
The original is here:http://www.concrete5.org/community/forums/customizing_c5/enable-pro...
Also please keep in mind I am a php newb :)
Here is the code pasted in:
<?php $u = new User(); $g = Group::getByName("Administrators"); if($u->getUserID() == $profile->getUserID() || $u->inGroup($g) ) { // All of the profile page as normal ?>
and then at the bottom of the page close out the if statement and scold them for snooping around :)
<?php } else { echo 'You do not have permission to access this page.'; } ?>
The original is here:http://www.concrete5.org/community/forums/customizing_c5/enable-pro...
Also please keep in mind I am a php newb :)
Mike