Skip to main content

Questions tagged [users]

Craft member accounts.

Filter by
Sorted by
Tagged with
0 votes
1 answer
13 views

Set Field Layout for User Groups

Is it possible to assign a field layout to user groups in Craft CMS 5? The UserGroup class does not have a setFieldLayout method. Is there another way to achieve this?
antdev's user avatar
  • 137
2 votes
3 answers
37 views

Deleted User - can their content be recovered?

Unfortunately we have deleted the user account for an ex-member of staff and all the content that they had put on the website has disappeared. We aren't sure who deleted the account, we assume that ...
Peter-IW's user avatar
3 votes
1 answer
43 views

Is it possible to silo Users and their Content absolutely by site?

We have multiple sites defined in Craft and we want content editors to only have visibility of things that are relevant to the one site they've been assigned to. I've set this up using a User Group ...
Karl Bishop's user avatar
1 vote
1 answer
50 views

Event on new user created

please can someone help me with this snippet of code I have written. I basically would like to check if a user is new. However, the below only triggers when an existing user is saved, not when a new ...
Mark's user avatar
  • 741
0 votes
1 answer
35 views

What is your strategy for users accounts when upgrading Craft?

I'm upgrading a site that has public registration from v3 to v4 (better late than never!) and it's going to take a few days to QA v4 locally to make sure everything works correctly… I'm wondering what'...
Yann's user avatar
  • 103
1 vote
1 answer
96 views

Saving custom fields of user with Ajax request

I am using an Ajax (POST) request to update the current user profile. So far I can successfully update the user fields (like fullName) but I cannot seem to update custom fields. I have tried adding ...
J1989's user avatar
  • 67
1 vote
1 answer
32 views

Craft 3 / 4 CP: Restrict users to specific user groups in Users view

I need to restrict access to users (not entries) of say AdminGroupA to be able to access and manage users of UserGroupA in the Control Panel. Right now, the user AdminGroupA can browse all of the ...
biko's user avatar
  • 670
1 vote
1 answer
56 views

Find all Users with a Custom Field Value in a Plugin

Spent a good amount of time trying to return all Users that match a custom field value. Reading the docs here, it shows a findAll() command. However, when trying the code below, it's not working. use ...
Dario Zadro's user avatar
1 vote
1 answer
46 views

How do i check for customers, not users, in a cart

Using craft commerce 3. I have an adjuster which applies a discount if a user of a certain usergroup. I check this with: $user = Craft::$app->getUser()->getIdentity(); if (($user && ($...
Henrik's user avatar
  • 425
1 vote
1 answer
38 views

User activation mail not working after a while

Does anyone know how much time a user has to use the activation link in the user activation mail? Some clients report to us that that they see an error page after waiting a weekend to use the ...
Matthias's user avatar
  • 301
2 votes
1 answer
61 views

Get list of user logins

I would like to get a list of every login of a user. I know I can get a certain user with craft.users() but as far as I have seen, I get data for lastLoginDate only. Is there a way to get a complete ...
obs's user avatar
  • 551
0 votes
0 answers
32 views

Is there a way to expose User edit history in Control Panel (similar to Entries)?

"Users" version should work like "Entries" versioning work
arshit kalkani's user avatar
0 votes
0 answers
47 views

How to export a list of customers per domain?

I got a Craft (-v 3.7.67) Commerce (-v 3.4.20) setup with 4 sites in two domains. I need to export a list of customers (or users, in my case users are 99% customers) per domain (so users that have ...
Antoine's user avatar
  • 157
1 vote
1 answer
55 views

How to migrate a selection of users passwords from a Craft 3 to a separate Craft 4?

I'm trying to move a large batch of users from a Craft 3 to a separate Craft 4 websites (only some selected data should be migrated). Element API + FeedMe looks like the right solution for that, as ...
Romain P.'s user avatar
  • 1,852
1 vote
1 answer
144 views

Custom module controller: how to impersonate any user and start its session

From a custom module, I would like to impersonate and start any user session in the browser. This session will be based on a user query result got from a web controller. Something in a way like when ...
Romain P.'s user avatar
  • 1,852
1 vote
1 answer
79 views

Update user matrix field dropdown through module

Appreciate I may be asking for a lot here - I have an existing module that I use to fire events when a stripe order is completed. I would like to iterate through some User matrix blocks and update a ...
Mark's user avatar
  • 741
1 vote
1 answer
112 views

User account activation via SMS

I would like to ask if there is a plugin or module that can activate/verify user account via SMS for Craft 4? I found a plugin called Validateit but its not yet compatible with Craft 4. I would like ...
Jeriel Jacinto's user avatar
0 votes
2 answers
61 views

How do I only display a list of users that have entries and hide the rest

I want to list users that have created entries in a specific channel. I tried it the Ben Parisak way, but that didn't work out. here's the code that doesn't work (example 1): {% set entryIds = craft....
outline4's user avatar
  • 595
1 vote
1 answer
25 views

Editing users preferredLocale from a plugin controller

Recently upgrade from Craft 2 to Craft 3. Also had to update all the custom plugins. Once of them is to run a daily import of users from a file. In that file we try to set the preferredLocal of that ...
user1535268's user avatar
1 vote
1 answer
477 views

User profile in craft 4 - first name and last name fields are gone

I noticed that first name and last name fields in control panel user profile are gone. There is just full name field instead. Is there some kind of setting that would bring first name and last name ...
Piotr Pogorzelski's user avatar
0 votes
1 answer
81 views

Multi-Site Craft 3 - How to set defaultTokenDuration to shorter duration for just 1 of the sites?

I currently have a multi-site Craft 3 install with this in the general.php config file (amongst other settings) return [ '*' => [ 'defaultTokenDuration' => 259200, //72 hours ] ] ...
Chad Crowell's user avatar
1 vote
1 answer
106 views

Add entry to entry field via frontend form

I have a frontend form that updates a single entry and sets the users field to the current user: <form method="post" accept-charset="UTF-8"> {{ csrfInput() }} {{ ...
jlg1807's user avatar
  • 11
0 votes
1 answer
40 views

LastInvalidLoginDate returning NULL, or current date if formatted

I'm wanting to show a user's last invalid login date within the control panel. No matter the value in the database, it comes back as NULL, unless I try formatting it as a date, then the current date ...
strandall's user avatar
  • 188
0 votes
1 answer
173 views

Prevent concurrent user logins/sessions

Is there a way to prevent the same user having multiple concurrent active sessions? Specifically if a user has logged into Craft's CP in one browser, but logs in on other browser/device, can we ...
Ian Nebbiolo's user avatar
0 votes
0 answers
45 views

Query multiple users and inner join to assets field

How to query multiple users and join to assets field? I want to query users with IDs [1,3,4] and inner join it to assets field with volumeId 5 and titles [1,3,4]. Tried this but this is probably wrong ...
tenshi's user avatar
  • 101
0 votes
1 answer
37 views

Register form activating other forms

So I have a contact form which shows a popup when it is submitted. I also have a registration and login form. The issue is: sometimes when a user logs in or registers an account, and you go to the ...
aren's user avatar
  • 79
0 votes
1 answer
115 views

How to query a user by username on controller level?

How to query a user by username on controller level? In twig I can do: {% set user = craft.users.username('username') %} How to do that in controller? Thank you for your help.
user's user avatar
  • 63
1 vote
1 answer
102 views

How do I allow a user to edit another users data via module?

I'm attempting to allow a user to edit other users via a front-end form. The "Edit users" permission has been checked in the admin but when I submit the form the data doesn't save. For this ...
Mike Niland's user avatar
2 votes
0 answers
151 views

Commerce 3 - Register user and save payment source after order complete for guest checkout

We register and send account activation emails to guest customers after checkout using registerUserOnOrderComplete. We also want the guest customer to be able to save their payment card during ...
iamkeir's user avatar
  • 468
3 votes
1 answer
197 views

Create a pending user from plugin

I'm trying to create a pending user account when an event occurs $newUser = new User([ 'firstName' => $submission->firstName->getValue(), 'lastName' => $submission->lastName->...
Steven Grant's user avatar
  • 1,855
1 vote
1 answer
40 views

Password setup screen on mobiles doesn't work properly

I am running a multi user site on Craft 3. When a new user is trying to set up their password for the first time, the default craft password setup page is not working on mobiles. It seems like the ...
LessMore Creative Studio's user avatar
1 vote
2 answers
587 views

How to get user info in a custom plugin task?

I've been trying to get the user id when running a task to save it on a table but cannot find a way to get it not even the user info. Using Craft::$app->getUser() or Craft::$app->user I get: [&...
Raul's user avatar
  • 11
1 vote
1 answer
105 views

Front-End user registration dynamic usernames - duplicate check

I have a front-end user registration form that generates a username automatically based on the first and last name inputs. This works as intended but on the off chance that two people have the same ...
Mike Niland's user avatar
1 vote
1 answer
44 views

Is there a way to trigger a user account creation from a different CMS?

I'm a junior web developer working with Craft CMS. I was wondering if there was a way to trigger a controller I have for my Craft CMS from an outside CMS. We have more than one website that offers ...
wannabecraftwiz's user avatar
1 vote
1 answer
169 views

Is there a way to change the author of an entry on the frontend?

So, I know that you can do this on the backend. But is there a way to change the author of an entry from a frontend form? I'm making a vacation request system and I'm wanting managers to be able to ...
Keatyn Garton's user avatar
2 votes
2 answers
211 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
247 views

Can I change a user field with twig without using a form?

I basically just want to set the value of a users field to a different number if something happens, so that the user field is actually updated in the CMS. Can I do that without creating a form? So ...
Keatyn Garton's user avatar
2 votes
1 answer
284 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
  • 526
1 vote
1 answer
287 views

How do I get custom fields of User on graphQL?

I am wanting to fetch queries for custom fields of users, how would I go about doing that? So if I did something like this: query { users { id firstName lastName email photo { ...
Keatyn Garton's user avatar
2 votes
1 answer
227 views

Admin notification when user updates user profile

I have a client that wants to be notified by email whenever any user on the site updates their profile fields. Right now, users can update their profiles through a front end form. Ideally, after any ...
LessMore Creative Studio's user avatar
1 vote
1 answer
198 views

How to Create an Author Page?

I'm trying to understand the best or most common approach to creating unique author/user pages that list that user's blog entries. This question was helpful for how to process the results. However, I'...
Dario Zadro's user avatar
1 vote
1 answer
204 views

Backend Save user fields

I'm just trying to change a value of any field in the User Table in Craft 3. Basically, say I retrieve a User by its ID and change the name and SAVE it... $oneUser = Craft::$app->users->...
Sylvain Tremblay's user avatar
2 votes
1 answer
892 views

how to check if a user email exists before creating a new user on a frontend form?

I have a signup form on my site and I want to check if the entered input (email) is already used in my DB before submitting the form. What's happening now is when I create a new user with a new email ...
Ra3d K's user avatar
  • 125
2 votes
1 answer
35 views

Multi user setting in a multi language environment

I am building a multi-language site in a multi-users environment. For each user I want to assign several text fields that should be translatable for each language, similarly like in entries/categories ...
LessMore Creative Studio's user avatar
1 vote
1 answer
46 views

Compare entry checkboxes with user groups to give access

I have a 3 levels of membership with a field on my entries matching those groups to restrict access. I know I can get a user's groups with currentUser.getGroups(), but how can I compare that with my ...
supazu's user avatar
  • 526
2 votes
1 answer
462 views

user session for Multi Site

I have a multi-site and they are under 1 root domain and the default site is food.com and bread.food.com is the additional site. How can I share the user session data of food.com to bread.food.com. My ...
Jeriel Jacinto's user avatar
2 votes
1 answer
205 views

Is it possible to display the debug bar while NOT logged in?

I'm trying to solve some possible performance issues caused in the logic of my site which checks for whether a user is logged in or not, to display or not display certain pieces of content. Is it ...
cballenar's user avatar
  • 1,409
1 vote
2 answers
245 views

Send automated emails to users that haven't logged in for X amount of time

What would be the preferred method to send an automated email to users that haven't logged in for a set amount of time? Let's say for a month. Are there any plugins that have this feature, or will it ...
JBrew30's user avatar
  • 102
1 vote
1 answer
662 views

How to update a User's Entries custom field only once just after save?

From a custom module, I'm listening to EVENT_AFTER_SAVE_ELEMENT events, to be sure to get the Entry ID after save: Event::on( Elements::class, Elements::EVENT_AFTER_SAVE_ELEMENT, function (...
Romain P.'s user avatar
  • 1,852
0 votes
1 answer
69 views

How to alter CP entry edit form

On an entry edit form I'd like to alter the options in a multiselect field to be user relative. Is there something like a form_alter hook?
ponies's user avatar
  • 387

1
2 3 4 5
11