Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
81 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
507 views

Headers already sent

I found this error repeated several times for two of the pages on my website. Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/mydomain....
MMT's user avatar
  • 41
1 vote
1 answer
204 views

Migrating user accounts to Okta

I'm trying to migrate users exported from Drupal into Okta using the /api/v1/users API (specifically [creating users with import hash][1]), and am stuck, and desperate for help as I'm late on a ...
Nick Myers's user avatar
1 vote
2 answers
435 views

Batch delete users and the content they created

When I received this Drupal 7 site to manage, it has had years of being open for people to make accounts and now I have ~ 300 PAGES of users with names like ismehacker1234568 and such, with under a ...
Hometoy's user avatar
  • 112
0 votes
1 answer
187 views

SMS password recovery

I'm currently using D7. When my users attempt to request a password reset, 95% of the time, these reset emails land in their spam, or are blocked by whomever their email provider is. That being said, ...
Brittany's user avatar
  • 241
0 votes
1 answer
41 views

Can't log in as admin

Someone let us know about an error on our site. I logged in (as an admin). I was able to move the site to maintenance mode and then went through the steps to clear the cache on the site. Once I did ...
Leah Craig's user avatar
0 votes
1 answer
129 views

How can I programmatically flag a user?

I am creating a new user programmatically in drupal7. At the time of user creation is there any way to flag the user automatically. I am using flags module. I tried in the hook_user_presave function ...
Jaseer Kinangattil's user avatar
0 votes
1 answer
29 views

Delegate user administration to a limited set of users

We are currently using the excellent domain module (allows segmenting users by domain) in and the user_import module (allows uploading users via CSV) in Drupal 7. We've got a new requirement where we ...
Mattisdada's user avatar
0 votes
1 answer
60 views

How do I get the roles of the currently logged-in user?

In Drupal 8 I would use the following code. $current_user = \Drupal::currentUser(); $roles = $current_user->getRoles(); What is the equivalent code I should use in Drupal 7?
Chloe Alvarez's user avatar
0 votes
0 answers
36 views

Is there a way I can access the user profile picture filename?

I want to create a view in the Drupal 7, where I can show the User Profile picture name (the original which user uploaded) and the path its saved.
rpotharaju's user avatar
1 vote
0 answers
54 views

How to trigger a rule whenever users update their picture

Using Drupal 7 and the Rules module I need to trigger a rule whenever users update their user-picture. I tried using the event "After updating an existing user account" which does trigger the rule, ...
dnoncoder's user avatar
0 votes
1 answer
38 views

Changing field instance display settings for view_mode

Background In the user.module file in user_build_content(), there is a line that adds fields for a given view_mode: $account->content += field_attach_view('user', $account, $view_mode, $langcode);...
mbomb007's user avatar
  • 536
0 votes
1 answer
42 views

Show a block on the user registration form depending on destination parameter

How can I show a block, or a a mini panel, on the user registration form depending on the destination parameter? Right now, I'm showing, in a view, a link that leads the users to user/register?...
BassPlaya's user avatar
  • 338
-1 votes
1 answer
169 views

How can I programmatically create a Profile 2 profile?

I am taking a look in the Profile 2 API documentation: http://api.drupalhelp.net/api/profile2/function I guess profile_create() or profile2_save() are what I need. But I have read somewhere ...
Alfonso_MA's user avatar
1 vote
1 answer
113 views

How to modify the D7 user login page html to remove the register and new password options for non-admins?

So, I'm maintaining a Drupal 7 site for which we recently switched the users over to SSO through a third-party OAuth provider. The implementation isn't fancy, but added a login link to what I assume ...
nizz0k's user avatar
  • 1,182
0 votes
0 answers
46 views

Getting white screen in Login /user and the page content

I was recently editing a website with Drupal 7 installed, and was integrating twitter feed. I created a block twitter_feed_block and assigned the block to the content section of the front page. It ...
Pushpa's user avatar
  • 101
0 votes
1 answer
41 views

Anonymous permissions with Nodeaccess

Content type: Webform Allowed grants: View, Edit Allowed roles: Anon, authorized, admin Go to the webform node eg. node/20 Click Grants tab Tick authenticated and admin users can View, anonymous is ...
user3108268's user avatar
0 votes
1 answer
21 views

Changing the html and order of system fields(pass/email/locale/etc) of user edit form

I have changed a number of forms accessible by users to fit a certain style. To do this I used an #after_build function that adds prefixes and suffixes to fields, as well as a bit of javascript. This ...
otherpoint's user avatar
0 votes
1 answer
34 views

Prevent login except from Services

I would like to prevent my users to login except for those who login through my REST Service. Is that possible?
Alfonso_MA's user avatar
0 votes
0 answers
46 views

Can't go anywhere from user edit page after login

Having an issue with a certain user that is not reflected on other users, when this particular user is logging in he isn't redirected to homepage or to admin/dashboard but to user/edit page, ...
Frederick Castello's user avatar
0 votes
1 answer
40 views

hook_custom_theme() works except if a user submits a user form with mismatched passwords. Then they get served the admin theme

Title basically. My hook_custom_theme() has been working for ages and I only just realised the admin theme is being served for an error when saving a user form ie. mismatched passwords. A snippet ...
Niall Murphy's user avatar
  • 2,771
0 votes
1 answer
58 views

Cannot assign roles creating User through REST endpoint

Sidenote, already seen this page, doesn't seem to help: How to create user with role(s) through REST service? I've setup a new endpoint on my platform to try to allow a 3rd party to create users on ...
Andrew Morris's user avatar
1 vote
1 answer
24 views

Are changes to the user status stored somewhere?

I've made a pretty serious error of judgement creating a view for a client that shows users created before a date AND still active. The error was adding a date filter. This was meant to be used at ...
Niall Murphy's user avatar
  • 2,771
0 votes
1 answer
176 views

How to use view's relationships to pull user entity reference data?

I created 2 new user fields for the user (object/entity) on my D7 site. Using views, I can select 'content' or 'user' for querying data. When I use views to query the 'user', the 2 new fields come up ...
Shawn's user avatar
  • 437
1 vote
0 answers
52 views

How to trigger Rules from Ajax-picture-uploader?

I'm using Rules with event "After updating an existing user account". It should trigger whenever a user uploads a new profile picture. Now I've added an ajax uploader for user pictures, the Avatar ...
dnoncoder's user avatar
0 votes
1 answer
67 views

Add paragraphs item to user entity

I want to create a new paragraph item to a user bundle. This is the code: $name = "Test"; $userdata = user_load($user->uid); $paragraph = entity_create('paragraphs_item', array('field_name' => '...
marcmueller's user avatar
-2 votes
1 answer
46 views

User role update report

Could you let me know how to check how many users converted from one role to another for a specific period of time (for example how many changed roles from user to superuser from 01/09/2017 to 01/02/...
adpo's user avatar
  • 59
0 votes
0 answers
139 views

Embed user edit form in a block

I am trying to embed current user edit form in block. Actually I want just to embed some of the newly added fields. I tried to follow this code: Embed some user profile fields in a block form But I ...
Lub's user avatar
  • 61
1 vote
1 answer
1k views

How to programmatically update a user role name

I would like to update role name programmatically in Drupal 7. Does Drupal provide its own functions to do that, or do we need to query the database and update the name manually? Please note that ...
Binny's user avatar
  • 936
0 votes
0 answers
276 views

Upload a folder full of files (static html and assets) to the private files folder when creating a node

I need to be able to upload a folder full of files (static html and assets) when creating a new node and then to output a link to the index.html file in the uploaded folder. They files from a ...
Danny Browne's user avatar
0 votes
3 answers
1k views

Adding field collections programmatically

I'm trying to add a field collection to my user account on an event, and it seems to be being created properly, the fields are updated as expected and it parents it to the user account, however, even ...
Andrew Morris's user avatar
0 votes
1 answer
279 views

Drush upwd Changes Database Hash but Login Fails

I have a weird one. I have a site that was abandoned for a while and we need to get access to it again. So I tried to use drush to reset the admin password, but it's not working. I'm using Drush 8.1....
Aaron Chamberlain's user avatar
0 votes
1 answer
409 views

Entity Reference - User reference field Hide "Restricted access" label instead of showing useless choices

i have an entity reference (7.x-1.5) select-list within a checkout pane which is being used to allow the user to attach a child to a product during a checkout process. The user can add multiple "...
DMAC's user avatar
  • 1,053
1 vote
1 answer
249 views

How to compare text input with a user password stored in the database?

I've been trying to compare password values using a custom form. Actually I want to show a relogin form after a particular amount of time. So I have created a custom form with two fields – email and ...
user avatar
0 votes
1 answer
126 views

Alter The User Login Form Into Multi Steps

I want to alter my default user login form into multi step. therefore I have wrote a code which I'm pasting below. but this code is not working, whenever I click on "Next" button it will return on the ...
Abdullah Zubair's user avatar
1 vote
2 answers
46 views

How to prevent Profile2 fields from loading on user registration?

I have a profile2 Profile that's named Driver. This profile has a Term reference to a vocabulary named Cities that contains over 30.000 terms. I made a custom user-register.tpl.php by declaring it in ...
soyjaz's user avatar
  • 11
0 votes
0 answers
44 views

Cannot modify headers when adding a new user

I periodically get an error in my drupal log that I believe is generated when a user is modifying or creating an account. Today, when adding an account as an admin, I finally saw it on the screen: ...
Christia's user avatar
  • 1,667
0 votes
1 answer
76 views

Update user profile picture using entity_metadata_wrapper

I am trying to update the user profile picture using entity_metadata_wrapper. But I am getting "Unknown data property picture." error. When I check the user property info, I cant see the ...
nirmal lama's user avatar
0 votes
1 answer
112 views

Why is Rules Action "Create Linked Drupal User Account" not working?

I’m using Drupal 7.56 and CiviCRM 4.6.31. I’ve been using Rules in Drupal to create a Drupal User Account linked to the CiviCRM contact created. But it's failing. I'm getting the following error: ...
Cristina P.'s user avatar
0 votes
1 answer
128 views

How to associate the last image from gallery to user's profile picture

In Drupal 7 (Commons 7.x-3.46). I've created a new content type, by which each user can upload images and build a personal picture-gallery. How can I now associate the last-uploaded-image to the ...
dnoncoder's user avatar
0 votes
1 answer
14 views

Features installed with profile are overridden

We are using workbench with the subpermissions module. We have created two features which set custom permissions for workbench and for subpermissions. If we install the workbench feature and then ...
m.snider's user avatar
0 votes
0 answers
71 views

global $user uid = 0 while logged in

I'm migrating my website to a new server and I'm facing a problem since then. Files are identical, so I have no clue. I want to access the global user variable in a subfolder, which is a custom php ...
jens_vdp's user avatar
  • 101
0 votes
1 answer
91 views

Rules to remove user from role on node publish

I have tried the following: Event: updating an existing content condition: NOT node-unchanged published remove user role (I'm stuck here) The last item is my problem. There is no user reference in ...
Ojchris's user avatar
  • 151
1 vote
0 answers
37 views

Is it possible to cancel the creation of user without triggering an error?

I have a problem with account creation spam, in which a bot or other bad actor tries to create accounts using somebody elses email address. The owner of the email address flags the verification email ...
frederickf's user avatar
1 vote
1 answer
141 views

How to migrate users and keep their IDs unchanged?

I'm trying to use migrate_d2d, via the UI, to migrate a site from D6 to D7. I need to preserve user UID's in the migration. I'm finding the documentation confusing.. Given this in the UI... What ...
Eric Aitala's user avatar
1 vote
1 answer
205 views

How can I set page specific user view access by user role?

I need to be able to restrict access to specific pages based on user role, I heard that nodeaccess could do that, but I haven't been able to figure out how to do that with it, can you set page ...
Eluchel's user avatar
  • 387
0 votes
1 answer
31 views

Change the location of Edit Profile

I am using Profile 2. When the user clicks the 'Edit My Profile' tab, I would like its destination to be: /user/175/edit/about-you Where about-you is a Profile2 type. How do I change the path of ...
IamOnStage's user avatar
2 votes
1 answer
40 views

How to stop users from flagging other users if they have a custom taxonomy term?

I'm working on a project where users vote other users using the Flag module. Each user has a department term reference field. I would like to stop a user from flagging another user if they have the ...
staion16's user avatar
0 votes
1 answer
127 views

Migrating sha1 user passwords into drupal 7

I have an old zend 1.8 cms site and I wish to import users into a drupal 7 site so that a user can login with their sha1 password without having to changing it. Once verified convert the submitted ...
hobbsie's user avatar
  • 53
0 votes
1 answer
25 views

How to break up user roles checkboxes into groups?

When editing a user in Drupal 7 (/user/NID/edit), I'd like to break up the roles checkbox options. By default, it is just one list of roles. Instead, I would like to group different roles together to ...
Matt's user avatar
  • 37

1
2 3 4 5
44