Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [user-groups]

The tag has no usage guidance.

1
vote
1answer
17 views

Revoke user permissions but not change the usergroup

I have a client who would like to edit a users permissions. However instead of adding permissions on a per user basis, they would like to remove permissions for that user by unchecking the item. ...
1
vote
0answers
37 views

User account registration using Craft 3

I wanted to build a commerce website using Craft 3. And I wanted to create parent registration form so each parent will have an account to use on the site. Then after they sign in I want them to be ...
1
vote
1answer
21 views

Set UserGroups for existing User

Using Craft::Pro Edition, I want to add a specific UserGroup to an existing User in my module. I tried it this way, but the group is not saved. $userGroup = Craft::$app->userGroups->...
2
votes
1answer
75 views

Separate User Groups / forms

I have two forms on my site, one that you can use to sign up as a registered user that allows you to view content through out the site and participate in steps (tests) etc. The second form is a form ...
1
vote
1answer
28 views

Plugin stops working when logged out

I have a plugin that sets the user group based on whether a hidden checkbox has been ticked on the sign up form. The plugin works exactly as I want it to while I'm logged in, but as soon as I log out ...
1
vote
1answer
66 views

Craft 3: Non-Admin Users Can't Login

Here's an odd one: I have a site with many users, only a few of them admins. Any admin user can login either via the /admin control panel or through a frontend login, which follows the example from ...
0
votes
0answers
45 views

Is there a Craft CMS equivalent of ExpressionEngine's 'Publish Layout'?

ExpressionEngine allows you to show and hide fields on the entry page per user group via 'Publish Layout'. Is there a built-in Craft equivalent? EDIT: Apparently it's on the list? Or a plugin that ...
0
votes
0answers
13 views

Access to a single entry [duplicate]

I have a Channel. I'd like to limit a user-group to a single entry. Is this somehow possible? For now I create a "Single" for each of the entries to use the permissions. But thats not perfect. I have ...
1
vote
1answer
21 views

Can user group permissions be used to override entry section locale settings?

I have created a localized site with 9 locales for a client in craft v2.6. They are now requesting us to create a user group for each locale so they can assign editors for each of those regions. When ...
1
vote
1answer
124 views

Restict admin user permissions to only editing users he/she has created.

I'm thinking about building an app with Craft that requires users from a specific user group (Business User Usergroup) to be able to log in on the frontend and add users from another user group (...
1
vote
1answer
72 views

Assign User to Group While Importing on Sprout Imports

we are trying to import users into a specific group but cant figure out how the json should go. Currently we have: [ { "@model": "User", "attributes": { "username": "...
2
votes
1answer
208 views

User restricted access to content via a common template

I’d like be able to restrict access to the content of entries, served by a common template, subject to the user group of the logged in user. For example: There is a template T User U is a member of ...
2
votes
1answer
145 views

Saving/assigning User Group via a plugin

Anyone had experience of assigning a user group when saving or registering a user via a plugin? Tried various combinations of $user->group = 1, $user->group = [1], $user->setGroups([$group]) ...
1
vote
1answer
57 views

Commerce Manage Settings for User Groups

When setting User Group permissions for users for Craft Commerce, there are explicit options for: Manage Orders Manage Products Manage Promotions But nothing is listed for Manage Settings. Is this ...
2
votes
1answer
147 views

How would I create unique fields for different user groups programmatically?

I understand this isn't possible from the Control Panel, I'm developing a custom plugin for this specific client project. Essentially these user groups won't need access to the Control Panelat all, ...
3
votes
1answer
39 views

Different setPasswordSuccessPath for different user groups

I have a couple different user groups that access the front end of our site and I would like to send them to different paths depending on their user group after setting their password. Is it possible ...
3
votes
1answer
68 views

Registration into default group is not working as expected

Here are my settings for user registration: \ When front end registration completes the users are added fine but not into the default user group as expected. They are just in the system with no ...
2
votes
2answers
278 views

Public url for assets when logged-in

I'm creating a website where I want users to be able to login. I'm using https://craftcms.com/docs/templating/login-form to achieve this. No problem so far. When a user is logged in, I want the user ...
1
vote
1answer
56 views

How to send email to user when we change his group?

I have some user groups with different permission and I need to notify them by email when i switch them to another group. Is there a way to make it automatic by a plugin or via the code directly?
1
vote
3answers
318 views

Set a user's group on a registration form using a hidden field

I am looking to have two separate front end registration forms for adding users to either the partners user group or the members user group. These have been created in the back end with the following ...
1
vote
2answers
277 views

Assign user group to group of entries

In the CP, is it possible to assign a user group to selected entries within a section. For example, say I have a section called Events. Within that section I have a fieldType called company. Can I ...
1
vote
1answer
47 views

Trying to Add a Specific Menu Depending on User Group

I'm trying to show a menu based on what group a user is in once they have logged in. However, I'm not having any success. Here is an example (for one of the groups) of what I have in my _base.html ...
1
vote
2answers
949 views

Show content if logged in user is in userGroup1 OR userGroup2?

This is so simple in ExpressionEngine and yet I've tried everything for several hours and can't find a way to get it working in Craft??? I have 2 User Groups: userGroup1, userGroup2 If the currently ...
2
votes
1answer
362 views

Multiple issues with User Registration from frontend

I am not able to get User Registration to work properly using a frontend form from the Craft Docs (https://craftcms.com/docs/templating/user-registration-form). Here are the particulars: Craft Pro ...
1
vote
2answers
117 views

Is there a way to detect if a action is triggered from a control panel form?

We're building a content platform for a bank for a client of us. One required feature lets relationship managers add clients (members) to the platform which get assigned a specific group. We listen ...
5
votes
1answer
740 views

Eager Loading Users Returning “Array to String Conversion” Error

I am trying to eager load users in a specific group to reduce queries. I've tried this: {% set designers = craft.users({ group: 'designers', ...
3
votes
3answers
138 views

Entry validation not working when Publish live changes permission is not checked

when a user with no permission to publish is submitting a blank entry, the entry is saved anyway without any errors. Here is the permissions set to the user group: I have few required field as ...
1
vote
1answer
61 views

entry.getAuthor().getGroups() always return empty array

I'm trying to output users groups for every entries in a for loop, but it returns an empty array: {%for entry in craft.entries.section('news') %} ... {{ dump(entry.getAuthor().getGroups()) }} ...
0
votes
1answer
231 views

User groups in relation to categories

I am building a community website that currently have two user groups but it might increase so I am trying to automate everything. The current groups are: 'teachers' & 'candidates'. I have a ...
0
votes
1answer
315 views

User registration - no confirmation email sent, not added to group

I have been testing out my user registration form and get to the following point: 1. User is created Most of the profile is created, except the firstName and lastName (these are the handles that I ...
2
votes
1answer
626 views

How to add addition attribute and fields in public registration form in Craft CMS

User Registration Form I want to setup a public registration form in Craft CMS. Currently this form support only fields username, email, password, but I want to add at least 10 other fields. Also I ...
1
vote
1answer
751 views

Get Groups from User in plugin

Wondering if I can get user groups directly after retrieving the user via craft()->users->getUserById($id), or if i need to use craft()->userGroups->getGroupsByUserId($id) also? As of ...
2
votes
0answers
37 views

Setting up Users to be able to only add/edit users they have set up.

I don't think this is currently possible. But maybe someone has done this already as a plugin or would I need to build one? Situation is I need to set up First level Users who would be able to set up ...
2
votes
1answer
450 views

currentUser: Impossible to invoke a method (“isInGroup”) on a null variable

I couldn't find this anywhere else, I'm looking up if the currentUser.isInGroup('verified') and if not, display another link. Works fine when logged in but throws a Template and Runtime error when ...
2
votes
1answer
237 views

Setting User's Groups - Integrity Constraint Error

$groupIds = [1, 2]; craft()->userGroups->assignUserToGroups($user, $groupIds); When executed I get the following error: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: ...
2
votes
2answers
240 views

Restricted access to assets in Redactor

I have created several asset sources in craft and now i created user groups, with different view rights to this sources. When a user with restricted rights goes to the "assets" tab in craft, the ...
4
votes
1answer
260 views

Change User Group Front-End

I've got a client project which utilizes the Users section of craft pretty heavily. I am trying to figure out if it is possible in vanilla craft to move a user from one group to another say, from the '...
2
votes
1answer
50 views

UserId Not correct

So I'm guessing this is just a basic error but I can't for the life of me figure it out. I'm trying to create a new user, set some attributes and add them to a group I've already made. The following ...
3
votes
1answer
214 views

How to remove a user from a user group?

Ok this should be pretty simple I feel! But I can't find the documentation for it. I can set assign a user to a user group within a plugin with: craft()->userGroups->assignUserToGroups($userid,...
2
votes
1answer
71 views

Can a user edit another user

So I'm setting up a system with 3 tiers of users. Admin Officers Managers I want Officers to be able to administer managers. Any of you know if this is doable? So let's say an Officer could login (...
2
votes
1answer
173 views

Could I use categories for users instead of user groups?

I'm developing a sports league site. The roles I'm setting up are admins, coaches, and players - with myself being the "super" admin. This is my first Craft project, so right off the bat I started ...
0
votes
1answer
87 views

Save Group Permissions

I'm trying to programmatically set group permissions. I came across the method saveGroupPermissions(). According to the documentation all you have to do is pass in the group ID and then an array of ...
0
votes
2answers
144 views

Display & check-for User Group on public profile

This two-part question is half an exact duplicate of How do you display a user's User Group? but I'm unable to leave a comment :( I'm trying to display & check-for the user group a user ...
0
votes
0answers
94 views

Access-rights at lower granularity than section?

I would like to make a page where different groups of users would only have access to the entries created by their own group. Now I can create a group and give it access to a certain section, but ...
3
votes
1answer
1k views

Creating Custom User Permissions

Is it possible to define custom user permissions in Craft? I'm building some front end templates that are only accessible by logged in users. Certain parts of this members page should only be ...
2
votes
1answer
112 views

Is there a master list of user/group permissions in Craft?

Has anybody compiled (or is it be possible to extract from the system) a master list of all the various permissions one can assign in Craft?
5
votes
2answers
2k views

What are the options for taking membership subscriptions via Craft?

In addition to ‘What is the current landscape regarding e-commerce plugins for Craft?’, I’m looking for current options for setting up membership subscriptions. I have a site in development that was ...
1
vote
0answers
49 views

An extra event upon usergroup assignment onAssignUserToGroup [closed]

I have come across a scenario where I need an event like "onAssignUserToGroup". This is purely for a client request and to modify functionality in the backend CP for my plugin, but this is the second ...
2
votes
1answer
255 views

How can i check an entry author's user group?

I'm trying to check if a user is part of a user group but not having any success! I tried this: {% if entry.author.groups == 'authors' %} But even though the user is definitely in a user group with ...
3
votes
2answers
395 views

Craft 2.3 new User does not set the default permissions group

Hello I do not know if this is a bug or something but we just updated to craft 2.3 and got an issue which we did not have previously. In user settings we can set the default permissions group but ...