Questions tagged [user-groups]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

permission to access users only on specific user group

I would like to ask if there is a permission to view and edit the users on specific user group? or is there any plugin to do that? example: I have user groups called "Class 1" and "...
Jeriel Jacinto's user avatar
2 votes
2 answers
151 views

Is there a way for a user to assign another user to a group on the frontend?

So, I'm trying to build a dashboard where the partner of the company I work for can edit users. And I want him to be able to have like a drop down to assign the user's group on the frontend. Is there ...
Keatyn Garton's user avatar
2 votes
1 answer
194 views

Add user to group based on registration form field

I'm trying to add my users to a group based on the option they select in a dropdown field. I feel like I'm close but so far - at the moment, it's not adding the new user to a group and it's clearing ...
supazu's user avatar
  • 564
0 votes
0 answers
61 views

access to specific settings in production

thanks for any advice in advance. I agree with craftcms that in production mode access to setting should be off limits. With that being said in the users tab on the dashboard I have not seen anywhere ...
jbrightdev's user avatar
2 votes
1 answer
122 views

Removing or hiding certain fields from the CP new entry for a specific user group

I'm trying to make some fields unavailable for a certain user group when they create or edit a new entry. These fields should only be available to admin users. I had implemented this by extending the ...
valley's user avatar
  • 65
1 vote
1 answer
64 views

Best Approach to all unique groups of users to edit unique groups of entries in 1 channel

I've got a request to let front end users edit entries in 1 section, but only if the entries are related to their user group - so different users will have ability edit a different subset of entries ...
CreateSean's user avatar
  • 1,963
1 vote
1 answer
429 views

Query to find users who are in more than one user group

I'm working with a site that has a few thousand user accounts. With the exception of core accounts with CP access, each user account exists for the purpose of access to event URLs which eventually ...
Jonathan Schofield's user avatar
1 vote
0 answers
66 views

Assign user to group available even though not allowed? (Craft v3)

Working my way through the CMS to learn in more detail I'm currently at the users / permissions parts of the CMS. Here I just bumped into the following thing I don't understand: I have a Users Group ...
Friksel's user avatar
  • 180
1 vote
1 answer
289 views

How to assign a group to a user in PHP

The following doesn't assign an existing user to a group. I've confirmed that both the user and the group exist. Any ideas? $user = User::find()->username($username)->one(); $user->setGroups(...
David Jones's user avatar
1 vote
3 answers
1k views

Restrict viewing front end to specific group permissions

How can I restrict content frontend to specific user groups? There seems no sensible way to do this out of the box. For example group permissions in CP are all about CP - there is no view option. ...
joomkit's user avatar
  • 2,004
1 vote
1 answer
207 views

Disable activation link email for a specific user group

I am developing a website which is having two user groups. The users of first user group will have self activation email with account activation link while second user group will be activated by admin ...
Bhashkar Yadav's user avatar
1 vote
2 answers
44 views

Show user group in CP user listing?

I want to scan my user list to see if anyone hasn't been assigned to a group. Is there a way to show user groups as a column at admin/users?
James Greig's user avatar
1 vote
1 answer
194 views

Restricting access to user groups with Control Panel access only

I know I can restrict template output to Admins only with : {% if currentUser.admin ?? false %} …and to any logged in user with: {% if currentUser ?? false %} And I’m aware of accessCp as a ...
Jonathan Schofield's user avatar
1 vote
0 answers
14 views

Allow logged in user to change his own user group using front end form

I'd like to allow a user to change his user group via front end form. I tried passing the groupId as the destination group, but it doesn't seem to work. This is what I was passing: <input type="...
Lori's user avatar
  • 866
1 vote
1 answer
51 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. ...
CreateSean's user avatar
  • 1,963
1 vote
0 answers
255 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 ...
Kirubel's user avatar
  • 111
1 vote
1 answer
123 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->...
lanz's user avatar
  • 13
2 votes
1 answer
118 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 ...
Kevin Love's user avatar
1 vote
1 answer
63 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 ...
Jordan D's user avatar
  • 255
1 vote
1 answer
312 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 ...
Marcus's user avatar
  • 419
1 vote
1 answer
32 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 ...
Adam Williams's user avatar
1 vote
1 answer
348 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 (...
Gįëł Tėttëłæår's user avatar
1 vote
1 answer
86 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": "...
Chattervast's user avatar
2 votes
1 answer
458 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 ...
Jonathan Schofield's user avatar
2 votes
1 answer
295 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]) ...
Cole Henley's user avatar
  • 1,741
1 vote
1 answer
100 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 ...
Mike's user avatar
  • 699
2 votes
1 answer
369 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, ...
Paul Kirby's user avatar
2 votes
1 answer
103 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 ...
Joel's user avatar
  • 127
4 votes
1 answer
139 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 ...
joomkit's user avatar
  • 2,004
2 votes
2 answers
864 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 ...
Mr. Sam's user avatar
  • 287
1 vote
1 answer
115 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?
Loïc Armiroli's user avatar
1 vote
3 answers
568 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 ...
Gareth's user avatar
  • 1,605
2 votes
2 answers
469 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 ...
Leon's user avatar
  • 121
1 vote
1 answer
53 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 ...
Todd's user avatar
  • 284
2 votes
2 answers
2k 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 ...
Shane Robinson's user avatar
2 votes
1 answer
500 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 ...
Roi Agneta's user avatar
  • 1,413
4 votes
2 answers
818 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 ...
luwes's user avatar
  • 145
4 votes
1 answer
1k 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', ...
Angela's user avatar
  • 559
2 votes
3 answers
235 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 ...
pvledoux's user avatar
  • 133
1 vote
1 answer
102 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()) }} ...
pvledoux's user avatar
  • 133
0 votes
1 answer
327 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 ...
LessMore Creative Studio's user avatar
1 vote
2 answers
510 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 ...
Adam Menczykowski's user avatar
2 votes
1 answer
864 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 ...
Jawad's user avatar
  • 21
2 votes
1 answer
1k 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 ...
taylor's user avatar
  • 1,128
2 votes
0 answers
38 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 ...
Lettie's user avatar
  • 2,033
2 votes
1 answer
747 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 ...
Rob's user avatar
  • 865
2 votes
1 answer
287 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]: ...
Dale Inverarity's user avatar
3 votes
2 answers
364 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 ...
Tom Bauer's user avatar
  • 1,327
5 votes
1 answer
414 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 '...
Panda4Man's user avatar
  • 253
2 votes
1 answer
64 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 ...
Darren's user avatar
  • 433