We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [user-groups]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
43 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 ...
1
vote
2answers
30 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?
1
vote
1answer
35 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 ...
1
vote
0answers
9 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="...
1
vote
1answer
23 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
156 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
27 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
103 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
34 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
141 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 ...
1
vote
1answer
26 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
197 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
79 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
276 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
195 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
68 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
173 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, ...
2
votes
1answer
51 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
83 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 ...
1
vote
2answers
365 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
75 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
373 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 ...
2
votes
2answers
328 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
49 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
1k 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
403 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 ...
2
votes
2answers
199 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 ...
4
votes
1answer
846 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', ...
2
votes
3answers
179 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
80 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
267 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 ...
1
vote
2answers
333 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
686 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
856 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
543 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
257 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
272 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
296 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
244 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
96 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
185 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
100 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
157 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
103 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
2k 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
121 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 ...