Questions tagged [users]

Use it for question about the user entity. Don't use it for a generic question about, for example, what users can do on a site.

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

Unable to process Batch actions as Administrator

I'm working with a brand new install of Drupal 10 and am having issues with the administrator account (both the default one created at startup and my own personal account) having 'Access Denied' ...
Joseph Quinn's user avatar
0 votes
1 answer
38 views

List (distinct) users in order of their most recently published node

I'm trying to list 8 users (name and profile image) starting with the one who created the newest node and follow with the rest of users in (descending) order of their last created node. I got to ...
hip's user avatar
  • 15
0 votes
0 answers
25 views

nodeaccess hidden main menu navigation

I have enabled the nodeaccess module for my Drupal 10 site and trying to figure out how to display the site menu navigation for certain user roles. In Drupal 7, there was a module called Always ...
Chad's user avatar
  • 1
0 votes
0 answers
32 views

Can i add my custom user field to a user mail template? [duplicate]

I added a custom user field (/admin/config/people/accounts/fields) with machine name field_about_user to my D9.5 site (yes i know, it needs updating...). Now i tried to add that field to the Mail ...
sirtet's user avatar
  • 63
0 votes
0 answers
54 views

How to use the user ID in the "more" link of a views block?

I created a media field for users. Users can therefore add media to their profile. I want to display their media on their user page. I created a media view block with a relationship "Connects ...
marsouin's user avatar
0 votes
1 answer
56 views

Using password recommendations code

I've got a Drupal 9 site where I'm adding a form that will add a user to the Drupal site and also to an external database. I'd like to be able to use the same mechanism that you see in the Add user ...
Ben Coleman's user avatar
0 votes
1 answer
83 views

Unable to resolve "User ID field needs to be updated" error on status page

I'm on Drupal 10.1.6, and the above-mentioned error is appearing on my status page under "Mismatched entity and/or field definitions." I had similar errors for fields on different entities (...
JOakland's user avatar
  • 452
1 vote
2 answers
48 views

Permissions to edit user field data, but not fields itself

How to allow a role to edit/manage user accounts e.g. click Edit and change email, username, password etc., but do not edit the fields itself, e.g. cannot just go to Manage fields and delete/create/...
user3108268's user avatar
0 votes
1 answer
80 views

order of role and status on user edit page has changed with 9.5 upgrade

in our 9.3 drupal installation , on the user edit page, the role was before the status. now in 9.5 , the status is above the role. I would like the role to be on top of the status the way it was ...
Diana's user avatar
  • 3,300
-2 votes
1 answer
88 views

Constantly creating new Anonymous users

I find that my instance of drupal is always "creating" new anonymous users. I have an even on Create New User that simply logs the name to a file, and it is filled with entries like 2023-10-...
dmgig's user avatar
  • 129
2 votes
1 answer
139 views

How to make the “last access time” field visible to anonymous users?

I have configured the user data display to show the last access information, but only me as I have the admin role can see it, anonymous users can not, nor even authenticated users: So my question is ...
Andrés Chandía's user avatar
0 votes
0 answers
36 views

Deny access to pages or nodes base from a database table

I was modifying a 2fa module for restricting users to access other account's page (user/%/2fa) which is working. function custom_2fa_menu() { $items['user/%/2fa'] = [ 'title' => t('...
DevNooby's user avatar
0 votes
0 answers
33 views

Show user fields on user page if user has flagged the viewer

I am stuck with a specific problem with flags and users and views. I have a flag on the user entity. Users can flag each other. Everything happens in logged in mode. Every user has some private fields ...
Matthias's user avatar
0 votes
2 answers
74 views

Creating user programmatically fails with Postgres

Anyone know what's wrong here? After the D8->D9 upgrade, a stupidly simple piece of code is not working, has there been a change? It worked before. $params = [ 'name' => $username, 'pass' =&...
Adaddinsane's user avatar
-2 votes
2 answers
94 views

How do I make an activation link on registration expire in 15 minutes?

I have user registration and forgot password mails sent to the user. I want 5 minute expiration for forgot password and user registration. Now the forgot password will expire after 5 minutes but new ...
Fazeela MukhappillyAboobacker's user avatar
1 vote
1 answer
259 views

Migrate user roles with static_map

I am trying to migrate D7 users into D10. I have enabled the following migrate modules: migrate migrate drupal migrate plus migrate tools The migration yml is as follows: id: create_user_account ...
ice70's user avatar
  • 131
0 votes
1 answer
296 views

Programmatically saving data in a field under user account

QR codes have been printed out for a bunch of students in a university. When they visit the site via those QR codes, and they are logged-in, the refcode query parameter used in the link needs to be ...
Maher B's user avatar
1 vote
1 answer
173 views

Get the value of taxonomy custom user field

I am trying to get a taxonomy field in hook_user_insert(). The logic is that if the taxonomy field is selected as none then print warning message along with a success message. function ...
Priya Degwekar's user avatar
0 votes
1 answer
64 views

How to inspect the form values in hook_user_update()?

In Drupal 7, one could have the following hook_user_update() to return TRUE if the 'roles' has been edited: function example_user_update(&$edit, $account, $category) { isset($edit['roles']) ? ...
Free Radical's user avatar
  • 15.1k
0 votes
0 answers
40 views

People view showing some users multiple times and others not at all

I'm seeing some weird behavior in the build-in People view and I'm going to try to explain it. There are 168 users in my site. If I change the view to show them all (and not paginate), it shows them ...
Delford Chaffin's user avatar
-2 votes
1 answer
205 views

Using Webform Submission, update a custom field attached to a user

EDIT: After working more on this, the user cannot be blocked and must be active / authenticated. Using webforms, I have a form that has a field that a new user (blocked) needs to fill out to tell the ...
jasonflaherty's user avatar
0 votes
1 answer
148 views

tempstore.private not working in openIDConnect client

I am getting some licence info via retrieveUserInfo in the openIDConnect custom client login process. Ideally i want to write it to the session but opted for the "tempstore.private" since it ...
snitch182's user avatar
  • 133
0 votes
1 answer
47 views

With English, French and Spanish enabled. Recently our Comms folks can't add translations

We're using Drupal 9.4.10 - turned on content translation for the Comms role for all content types, URLs, etc. but that role cannot create translations for any content type. They can edit the ...
Kathryn Carruthers's user avatar
0 votes
0 answers
16 views

eCommerce Products Permissions per Node

Good day We are building an eCommerce Platform where multiple users can be able to register, login, create, edit and delete their Profiles and Products. The main feature is to have each user to only ...
Thomas Tsita's user avatar
0 votes
1 answer
120 views

Views Exposed filter can't input username to filter. Only works with User ID

I created a custom View, where it shows all of a specific content type. In this content type I have a field that is a user reference called "Assigned to". In this view, I want it exposed so ...
Patoshi パトシ's user avatar
0 votes
1 answer
146 views

Logged in user data, after logout

I need the ID of the logged in user, after logging out. I tried to use a session variable, but all data is lost on exit. Is there any method to use, other than the query parameter? ┌──────────────┐ ...
Kurucz István's user avatar
0 votes
1 answer
41 views

How to get "user pictures in posts" to not be greyed out/ disabled?

Setup: Drupal 9 with Claro admin theme and Olivero default theme. Scenario: When I navigate to admin>appearance>settings>global settings, under the first section "page element display&...
zack cv's user avatar
2 votes
1 answer
341 views

checking route access for authenticated role

I'm outputting a link, made using Url::fromRoute(). If the current user is anonymous, and the route is not accessible to them, I'd like to show a 'Log in to use this link' text instead, simular to ...
joachim's user avatar
  • 846
1 vote
1 answer
591 views

Removing orphaned paragraph references from the user

Setup Drupal 9 site has Users and each user has a Paragraph that contains "Phone" data. User => Phone Paragraph connection is made via field $user->field_phone_para. Issue Somehow ...
Raido's user avatar
  • 11
0 votes
0 answers
194 views

Messenger doesn't display value after user logged out and redirect

After my user is submitting a form, I want to logged him out, then redirect to the front page. then, display a message. public function submitForm(array &$form, FormStateInterface $form_state) { ...
lobafox's user avatar
  • 113
1 vote
1 answer
159 views

How to display a user’s published content on their account?

Does anyone know how to display every article (or content type) a user has published on their "my account" view? To clarify, I only want it to display that specific user's published content ...
ImagineSystem7's user avatar
1 vote
1 answer
399 views

How to programmatically set a checkbox value of an user account which field is not in /people/accounts/fields

I need to set a checkbox which has an unknown field (machine) name in the user account. the checkboxes are in the user account /user/?/edit but they doesn't appear as fields in people/accounts/fields ...
Tobi's user avatar
  • 23
1 vote
1 answer
162 views

How to hide the tabs on the user account if it is not his account? [duplicate]

My users have permission to view other users' accounts. Only the "View" tab page. This is exactly what I want. On the user account, by default, there are three tabs: View Shortcuts Edit ...
eric55's user avatar
  • 11
0 votes
0 answers
834 views

I am logged in as admin user but I get a message saying I am not authorised to access the Update or Install pages

I am not able as user 1 to access the 'Extend -> Update' or 'Extend -> Install new module' pages (I can, however, access the 'Extend -> Uninstall' page). This has only started happening in ...
unity_of_opposites's user avatar
0 votes
0 answers
54 views

How can I update my staging with with the users from the live site?

I have a staging site I am about to push live, however I have a bunch of users on the live site that I need to pull over to the staging site before I push it up to the live site. I have google ...
Eluchel's user avatar
  • 387
0 votes
1 answer
16 views

Auto send userA's profile URL to userB

I thought this could be easy, but I don't know what's the best way to achieve this. I have an acting "job" application site, userA need to finish his "profile2" first which ...
lee's user avatar
  • 1
1 vote
1 answer
522 views

Replacement for hook_user_presave() for saving values captured in the user form to the user profile

I am porting a module from Drupal 7 to Drupal 9. The code uses hook_user_presave() to save two fields on the fly into the user profile data. /** * Implements hook_user_presave(). */ function ...
Binny's user avatar
  • 900
0 votes
0 answers
59 views

Conditional filter for visitor role

I'm throwing a big number of views showing a list of 'events' (nodes) happening today, tomorrow and after tomorrow. I'd like registered users with role 'editor' could see all events from today (not ...
hip's user avatar
  • 15
2 votes
2 answers
92 views

How do I display user signatures in comments?

Drupal 7 has a "personalization" section on ...admin/config/people/accounts If this exists in Drupal 9, I'd love to know where it is. The goal: enable signatures for user accounts. If it's ...
aharown07's user avatar
  • 382
1 vote
1 answer
22 views

Column of owner of webform submission in database

I need to find the column of the owner (user_id) of form submission in webforms. I need it in order to create some complex queries for the needs of the client. I looked in webform_submission_data and ...
Dimitris Markopoulos's user avatar
0 votes
1 answer
29 views

How can I prevent Drupal from saving the user's initial email address? (init in the users_field_data table)?

I am trying to reduce the amount of PII (personally identifiable information) that my site collects. When a user registers an account, by default, that email address is saved twice in the ...
Patrick Kenny's user avatar
0 votes
1 answer
40 views

How do I list all the roles to assign them in the registration form? [closed]

I'm trying to alter the user registration form by adding a custom field which lists all the available roles in the site. How can I achieve this?
Gowthamraj's user avatar
0 votes
1 answer
148 views

how can I add contextual links to each of the items in my view?

I am creating a view in drupal and I need that each of the items of this view (are publications) have a contextual link to access more easily to edit this publication. I have tried adding {{...
LeJuanChis's user avatar
0 votes
1 answer
67 views

How to use the user profile photo as the default image in a content type image field?

I would like to pull the current user profile photo in a content type image field but the default image option only allows the admin to choose an image file. Is there a module that allows the admin to ...
CocoSkin's user avatar
  • 893
1 vote
0 answers
56 views

Show user page only if displayed (and not current) user has a specific role

On my site, anonymous users can access user information with this type of url: /user/25 It works fine, I created a template for this branch: user–full-html-twig. However, I would like this type of url ...
Sébastien Gicquel's user avatar
0 votes
2 answers
568 views

How to get newly created user id in user_presave hook?

Following is my .module file code /** * Implements hook_user_presave(). */ function cost_sheet_user_presave($account) { $source_userid = $account->id(); \Drupal::messenger()->...
Rifas Ali's user avatar
  • 490
0 votes
1 answer
33 views

How can I run a certain action when a taxonomy field value is removed or added? [closed]

I have a user_territories field which can have multiple values. I need to run a certain action when this field value is changed from the user entity, not when other fields are changed. How can I write ...
Rifas Ali's user avatar
  • 490
0 votes
1 answer
293 views

"Unable to remove item at non-existing index"

I am currently working on Drupal 9 build of the Drupal 7 site along with just user migration. The site had existing 20K users and we're migrating them with Drupal Migrate module with simple bring ...
Tony's user avatar
  • 1
1 vote
3 answers
125 views

Joomla user password to Drupal migration

I have a Joomla 3.10 and a Drupal 9 site. I want to migrate user passwords from Joomla to Drupal. I have seen that Joomla uses bcrypt and Drupal uses sha512 as the password encryption. Is it possible ...
user avatar
1 vote
1 answer
48 views

Anonymous User name is changed to a strange name in watchdog logs [closed]

Our D9 site's dblog is showing the anonymous user name as a very stange name instead of anonymous. All anonymous users are shown as "closhewupheheh…" even though the anonymous user name is ...
quantumized's user avatar
  • 1,217

1
2 3 4 5
131