Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% if currentUser.isInGroup('groupHandle') %}
- {{ currentUser.getGroups() }}
- {{ currentUser.can('permissionName') }}
- //get the current user from craft
- $user = Craft::$app->getUser();
- //check if the current user has permission to edit certain entries
- $user->getIdentity()->can('editEntries: 27')
- //check if user is in group
- $user->getIdentity()->isInGroup('specialGroupHandle'));
- //get the current user from craft
- $user = craft()->userSession->getUser();
- //check if the current user has permission to edit certain entries
- $checkPerms = $user->can('editEntries: 27');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement