Skip to main content

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
2 answers
1k views

How to prevent other roles from publishing content

I am new to Drupal. I am working on a website where I have 2 user roles: Site admin and editor. The site admin has all permissions. I want the editor to only have the permission to edit content but ...
1 vote
1 answer
940 views

How to get new password by mail instead of password reset url (Forgot password)

When we click on "Forgot your password" and enter email id, Drupal will send password reset URL by mail. But is it possible Drupal send any random password by email instead of URL? I have checked ...
4 votes
2 answers
647 views

How to set Permission based on roles for Views Data Export

Using views data export module, I set the permission for different roles in the Data Export in Views like: But I can still see the Export button for all users in front page. However if the role doesn'...
2 votes
1 answer
1k views

How to add profile fields on Ubercart 3 checkout page?

I used to use the uc_profile module to add user profile fields to the D6/Ubercart 2 checkout page, but I cannot find a suitable solution for that same functionality in D7/UC3. Can anyone guide me ...
0 votes
2 answers
431 views

Sync user roles across websites

I am using Drupal 7. I want to sync my Drupal website roles on 2 websites on the same top level domain, as in, one is example.com, the other is other.example.com, how can i achieve this? Bakery module ...
0 votes
1 answer
2k views

Redirect user to previous page after registration

I'd like users registering on my website are redirected to the page where they clicked the "create account" button which is in a modal. First, I tried to redirect to an absolute url I tried $...
-2 votes
3 answers
52 views

How to prevent user delete for certain condition? [closed]

We have a custom subscription system which is linked to user. Some time, many spam accounts are registered and we delete them. We do not want to delete a subscriber account, since that causes issues ...
0 votes
1 answer
31 views

Need to find and disable an email that may be coming from a module

There is an email that goes to users that seems to be produced by a module (on a role change) that is confusing to a specific client's users. They would like me to disable that specific email, but I ...
6 votes
1 answer
2k views

How to add template suggestion for user--VIEW-MODE--ROLE.html.twig

I used hook_theme_suggestions_HOOK_alter: function MYTHEME_theme_suggestions_user_alter(&$suggestions, $vars, $hook) { // Define the view mode. $mode = $vars['elements']['#view_mode']; // ...
1 vote
2 answers
2k views

How to handle multiple stores and multiple store admin users

Is it possible to create a restaurant(multi-store) online delivery system using Drupal commerce and OG? It has multiple stores(restaurants) in different locations which can be manageable by individual ...
1 vote
3 answers
787 views

Send an email when the roles are changed

I'm trying to send an email to users after their role has changed. So far, the rule is triggered every time the profile is saved (even without role change); I suspect that the data comparison is not ...
3 votes
1 answer
643 views

Is there a way to add node grants to anonymous users?

I want anonymous users to be able to access nodes that are promoted to the front page. (They can't access to nodes that are not promoted.) It seems hook_node_access() isn't seem called for anonymous ...
1 vote
1 answer
702 views

Why is the login redirecting to the access denied page?

This question has been asked before but I see only D7 versions of the question, and none of their answers have helped me in D8. I log in perfectly fine with Chrome or Firefox, but IE 11 redirects to ...
1 vote
2 answers
2k views

How to show view for submitted result of a webform by a user

How i can show all submitted value of a webform by a user in a view in a tab of a user profile section. Iam using drupal 6.For example when user click on a tab say form on his profile the webform ...
6 votes
8 answers
3k views

How can I protect development sites with Basic Auth module enabled?

During development phase a dev site should be protected from being browsable by unauthorized visitors. Usually I use Basic Auth configured in the web server. This way the only information an ...
1 vote
1 answer
982 views

Display user list with number of comments and forum posts

I want to create blocks to display a list of all users with their number of comments and number of post on forum. In SQL, something like that : SELECT u.name as user, COUNT( n1.nid ) as 'number of ...
2 votes
1 answer
615 views

How to import multi-value fields into profile2 using the Migrate module

I have users each with a profile using the profile2 module. I am using a cookbook based on the Migrate framework to create the users and import profile data. Sample CSV data would be: "member_nr","...
1 vote
2 answers
326 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 ...
0 votes
2 answers
427 views

How do I add fields and hide them from client?

I added fields to a Client profile using Profile2, such as first name and last name. But I added another fields, let's call it "Assigned Consultant". But the "Assigned Consultant" field... I don't ...
1 vote
3 answers
601 views

How to make a page visible only to users with permission to use the administration theme?

I have created a basic page which I only want to be viewable by people who have access to the administration theme. I have given the page a path of admin/shipping-help but to my surprise the page is ...
1 vote
1 answer
884 views

Define permissions for Actions?

function custom_mod_action_info() { return array( 'custom_mod_delete_user_cats' => array( 'label' => t('Delete a users cats'), 'type' => 'user', 'configurable' => ...
0 votes
1 answer
798 views

Form Validation. Ensure Placeholder is not submitted value

I have a Drupal registration form with a placeholder set on a first name field. I am trying to get the form to check so that if the placeholder value is the same as the submitted value it will give an ...
2 votes
2 answers
927 views

Remove links from the menu tabs

How can I remove the some links from the Tab, when we are login as a particular user. Please see the below picture. I want to remove the tab Items maked in red rectangle (deny access to this link). ...
1 vote
1 answer
210 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 ...
0 votes
2 answers
440 views

Users cannot log in to new site in multisite

I am working with the Drupal multisite functionality. I have been asked to implement the following architecture: mysite is a Drupal site with several angular pages. mysite/backend is a separate site ...
7 votes
1 answer
787 views

When can uid 1 get an access denied page?

I am having a very strange problem that I can't track down. We have been working on a custom site for a client now for several months. Theme is a Zen subtheme. I can't remember the last time I ...
10 votes
1 answer
2k views

Programmatically impersonating another user without causing the currently logged-in user to log out

How should a module change the value of the global $user, execute its own code, and restore the original value of $user without causing the current user to be logged out if an error happens?
1 vote
1 answer
2k views

Basic Password Reset steps not working

I have reviewed other similar posts, but none matches my problem. I built a Drupal site based on an old ASP.NET site. I imported the users from the old DB (which had passwords in plain text!). Most ...
3 votes
2 answers
877 views

Flood control IP bypass whitelist

I am utilising Services to open up some login resources on my site and as a result if multiple users incorrectly try to sign in the entire external website will be blocked because of flood control. ...
0 votes
2 answers
994 views

How do I add tabledrag with 'weight' to admin form

I have built a fairly basic module but i'm struggling with the UX of the admin form. Essentially I need a list of items that have several values; a textfield, checkbox, select list and a button to ...
0 votes
1 answer
388 views

In code alter user registration and override approval to no approval required

In my module I want to override the approval for certain users so that they are immediately approved and get the corresponding email. The module looks at the subdomain to decide if approval is ...
1 vote
1 answer
459 views

Assigning a badge to a user using Flag, Badges and Rules

I am interested in assigning to user a Badge after he favorites 3 nodes. I want to do this with Flag, User badges and Rules. How can I do that?
1 vote
1 answer
427 views

Unable to edit node translation other than current language

On my multilingual site I seem to have problem at admin/content when editing a particular translation. I have a Contact Us page, translated: Contact Us [EN], node/286 Contact Us [ES], node/300 I ...
1 vote
4 answers
1k views

Create duplicate registration form with extra fields

I have a site built using Drupal 7. The site has a registration form now. There is a new requirement to add a couple of new fields in the registration form and put it in a new page. http://example....
1 vote
1 answer
440 views

Ubercart Node/Product Field access to Role and purchaser

I have an Ubercart ecommerce Drupal 7 site I'm building. The user can either subscribe (monthly/annually) or purchase node by node (pay as you go). I need to GRANT the subscriber or purchaser access ...
3 votes
1 answer
458 views

Why does "Cancel People Account" not work?

I have Drupal 7 with Devel installed running over PHP internal server and MySQL. All user operations work correctly except Admin>People>Cancel Account operation. This leads to the overlay Add User ...
2 votes
3 answers
588 views

create a custom form based on user fields

I created new menu item witch I want to insert a custom form to edit some user fields : $items['user/%user/edit-custom'] = array( 'title' => 'Knowladge', 'page callback' => 'drupal_get_form'...
2 votes
1 answer
395 views

give permission of create new revision to specific roles

I need to give the permission of "create new revision" to a specific role. but nothing related to this issue appeares in permissions page! I've installed Revisioning module too. how can I set it?
6 votes
1 answer
560 views

Automated login with LDAP always returns error

I have successfully setup LDAP module to authenticate users (and create new users). This is done through manual login form. Now I'm trying to enable automated single sign-on, but with no luck. I ...
1 vote
1 answer
418 views

Adding fields, account registrations and editing profile

By default Drupal has a profile system in place that stores user name, password and email. Profile2 extends this to allow specific roles upon account creation as well as more options for adding ...
0 votes
2 answers
430 views

How to grant permission to specifc role to perform CRUD operations on a particular content type only?

I've set up different roles and in my site and I want a specifc role to grant permission to perform CRUD(create, Read, Update, Delete) operations on a particular content type only. But I can't find ...
2 votes
1 answer
532 views

Filter Taxonomy reference field on Workbench Access permission

i need some help with Workbench access based on taxonomy. This is my use case: I have this taxonomy structure for my site: - Term A - Term B - Term C And i have 2 roles: - editor - editor C ...
0 votes
1 answer
410 views

Custom user_register_form for Auto Assign Role registration pages

I'm using a function[a] to get custom templates to work for all pages, including role registration pages set by Auto Assign Role. By setting the role registration path to user/register/<rolename>...
0 votes
2 answers
483 views

Allow user to fill out node form, then force registration

I'm making a classified website. Have a button that say "Make a ad" I would like the Anonymous user to be able to fill in the text for the ad. But the Anonymous users after filling in advert. has ...
0 votes
3 answers
896 views

User authentication handled by a web service

I seek your help and advice. By default, Drupal manages user authentification using the user module that resides in the "core/modules" and through the main Drupal Database. In my case, the user is ...
1 vote
1 answer
406 views

File upload ajax and Radio Buttons not cooperating in registration form

I have enabled Profile 2 and profile Profile2 Registration Path modules on my site and have a really long registration form with lots of fields. I have some radio boxes and file upload fields also. ...
2 votes
3 answers
535 views

How can I redirect users on login based on their chosen language?

I'm looking to redirect users after they login. The site is multilingual, using English and French. I've tried using the Login Destination module and using Rules, but it has no options for accessing ...
0 votes
1 answer
426 views

Change default format for date field on user register form

I'm new to Drupal 8. In the user registration form, i've added a Date field via manage fields in user account settings. However, I need to customize this field and change its format. I tried 'manage ...
1 vote
1 answer
800 views

How do I reroute a logged-in user after page access denied at user/login?

My Drupal 6 site has the login form at /user/login. If I'm logged in already and I click it, I'm sent to the Access Denied page (though the login URL stays the same). I'd like to send such users ...
3 votes
2 answers
499 views

How to add a new user badge after earning a certain number of user points?

I'm using the User Badges and User Points modules. I want that when a user earns a certain number of user points, the user's old badge is replaced by a new one. For this, I have already created a rule ...

1
2 3 4 5
131