Jump to content

Module with password access


Ephendi

Recommended Posts

  • Administrators

You can use the native permission system and tie your module to a certain usergroup and only allow access to that group.

Something like

if(Auth::LoggedIn())
{
if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))
{
 //your functions
}
}
else
{
 echo 'No Access';
}

Just replace "ACCESS_ADMIN" with the permission you would like to use. If you so not allow the group access to the admin area but do allow the permission for a function below this will let them in your module but not in the admin section.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...