Questions tagged [users]

Craft member accounts.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Query user by code and id parameters found in set password path OR custom reset password path

Is there any way to query users using the parameters of set password URLs? I need to distinguish between the very first activation (welcome) email and reset password email because their corresponding ...
biko's user avatar
  • 661
1 vote
1 answer
34 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 Poirier's user avatar
1 vote
1 answer
29 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 Poirier's user avatar
1 vote
1 answer
27 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
  • 707
1 vote
1 answer
46 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
49 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
  • 575
1 vote
1 answer
20 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
142 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 ...
piotrpog's user avatar
  • 1,266
0 votes
1 answer
41 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
37 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
25 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
38 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
37 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
26 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
  • 69
0 votes
1 answer
57 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
75 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
91 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
  • 458
0 votes
0 answers
24 views

How to make categories visible only for user/usergroup in backend?

following problem/question: A section is filtered by categories in frontend. For the backend I need a filtering, when users pick a category from a field type select, which included the categories. ...
Patric Kersten's user avatar
3 votes
1 answer
118 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
280 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
63 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
35 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
107 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
89 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
147 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
121 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
  • 478
1 vote
1 answer
185 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
114 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
135 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
117 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
606 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
32 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
38 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
  • 478
2 votes
1 answer
283 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
149 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,369
1 vote
2 answers
198 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
  • 72
1 vote
1 answer
403 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 Poirier's user avatar
0 votes
1 answer
62 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 vote
1 answer
142 views

User field names?

The online documentation states: Each user has an email address and username by default, and optional fields for a name, photo, and password. Excuse the dumb question, but where do I find the what ...
Mosswalker's user avatar
1 vote
1 answer
25 views

Change password messaging per site?

I have several sites running under one Craft install. Two of them are for our internal use, and one is public-facing. On the public-facing site, I need to provide a reset password function. When the ...
4midori's user avatar
  • 574
2 votes
3 answers
297 views

Deleting user data from the database

I'm using Craft 3.6.4.1 and I need to delete a whole tranche of users from the database (that has derived from another Craft instance). I've been deleting by hand via the CMS but note that loads of ...
Jonathan Schofield's user avatar
0 votes
0 answers
33 views

Updating user email does not update username when useEmailAsUsername is set

When the config setting useEmailAsUsername is set, I would expect updating a users' email address to also update the username field when saving the element. However, this does not occur unless you ...
William Isted's user avatar
1 vote
1 answer
54 views

Prevent adding users with same email addresses

I am adding new users inside of the Craft controller as part of the frontend user import script. This is the code: $user = new User(); $user->pending = true; $user->username = $email; $user->...
Mato's user avatar
  • 219
1 vote
1 answer
53 views

After signup action

I'm trying to add an action after user signup so that we can post the clients external system so we can retrieve a customer number that we require. My question is does EVENT_BEFORE_VERIFY_EMAIL run as ...
spence's user avatar
  • 33
2 votes
1 answer
275 views

Stay on the same page after logout

Is it possible to stay on the same page after logging out from the frontend, assuming that guests can still view that page? By default, when logging out we are redirected to the homepage or some ...
piotrpog's user avatar
  • 1,266
1 vote
1 answer
62 views

Display user photo within a User field type

I'm making a staff page with a User field type, so you select all the users you want displayed. I'm having trouble showing each user's photo though. This works: {% for user in block.staffList.all() %} ...
Bryce's user avatar
  • 251
2 votes
1 answer
217 views

How to configure the system messages <link> url?

we have got a multisite environment and have imported users with different preferred languages (de and en). Therefore we made a module, cause the feedme plugin doens't set the preferred language https:...
Marten Brosch's user avatar
2 votes
2 answers
254 views

Guest user registration using Commerce 3

I have just started using Craft Commerce (only Lite version currently) and I'm currently trying to get to grips with what is possible. My question is regarding subscriptions. The site that I'm working ...
Adam's user avatar
  • 245
1 vote
1 answer
311 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
2 3 4 5
10