lancaster123 Posted October 9, 2014 Report Share Posted October 9, 2014 Hello I have set up a module in my phpvms and when I link my button in the nav bar it show to everybody as normal but what I would like to do is only show the button to people in a group I have made up in the admin panel. I have found this but it doesn't work just returns and error on the line with the link on. <?php if(Auth::UserInGroup('GroupName')) { echo '<li>Your link here</li>'; } ?> Any ideas how to fix this? Thanks Quote Link to comment Share on other sites More sharing options...
Strider Posted October 17, 2014 Report Share Posted October 17, 2014 <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { ?> <?php echo '<li><a href="'.fileurl('/admin').'" class="underline">Admin Center</a></li>'; } ?> <?php $admin = ExamsData::check_admin(Auth::$userinfo->pilotid); if ($admin->admin_level >= '1') {echo '<li><a href="'.url('/Exams_admin').'" >EXAMCenter Admin</a></li>';} ?> <?php } ?> Something like that. Just change the access_admin part. Quote Link to comment Share on other sites More sharing options...
lancaster123 Posted October 17, 2014 Author Report Share Posted October 17, 2014 thanks got it to work now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.