Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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
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
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
0 answers
66 views

How to get a list of users based on the radius?

I want to allow users (workers) to give their address using addressfield and also give a distance or radius they are prepared to travel. It is a job site. When a client posts a job (node) and provides ...
Umair's user avatar
  • 441
0 votes
1 answer
94 views

How to grant referenced user access to Profile page

I use Node access user reference module in many projects. I have a very similar task: Grant access to a profile page for those user who is referenced in that profile. Unfortunately, Node access user ...
StG's user avatar
  • 302
2 votes
1 answer
65 views

How to delete all Drupal content owned by a particular user?

It seems like there should be a drush command to achieve this, but I cannot find one. I am not clever enough to fashion an SQL query that will delete all nodes owned by a user as well as clean up all ...
Blake Frederick's user avatar
0 votes
1 answer
228 views

Adding multiple users to a field using user/autocomplete

I have the following code to add a field to my custom module to add in users. But I can only add in one user using the user/autocomplete feature. $form['usershare'] = array( '#title' => t('...
Patoshi パトシ's user avatar
2 votes
1 answer
103 views

Create a hidden character field?

How can I create a hidden character field in D7 for a text field that hides the user input like the password field does? For example a field called "social security number" should not display the ...
and93hil's user avatar
1 vote
1 answer
269 views

How to create access permissions system similar to Organic Groups access, using Eck entities

There currently still is not a working version for Organic Groups access control, compatible with ECK entities. My current site contains entity type project and entity type project content. The ...
Yuri's user avatar
  • 628
0 votes
1 answer
31 views

User referencing another user causes unexpected error

I have a Drupal 7 site with a bunch of users. Some are clients and others are sellers (role). I put an entity reference field field_seller on the user account form which filters users with the seller ...
iamfredrik's user avatar
0 votes
1 answer
15 views

How can I show field from profile2 instead of username depends on user's role?

I have 2 profile2 types (and two common user roles) - "employer" and "applicant". I have "field_company_name" in "profile_employer" and "field_real_name" in "profile_applicant". I want to show ...
Alexander Mudrov's user avatar
0 votes
1 answer
74 views

Creating/registering a user (of a custom profile type) when a certain webform is submitted?

Before all else - Here's my current code. function hook_webform_submission_insert($node, $submission) { $password = user_password(8); //set up the user fields $new_user = array( 'name' =&...
Mackenzie Fritschle's user avatar
0 votes
1 answer
358 views

Specified template file for user-profile-form based on role

I use drupal 7.x and field_group and nultiple registration module. How I can use a template file (.tpl) for user-profile-form only based on roles. in other words when a user with A role login to site ...
omiti's user avatar
  • 145
1 vote
5 answers
3k views

How to customize a textarea field?

I have created a textarea field using admin ui. It allows users to add Bio to their profile. I want to do 2 things with this field. Limit the characters to 255. Use a text format. Note: I do not want ...
Umair's user avatar
  • 441
0 votes
2 answers
374 views

Create user profile using content type or add additional fields to the default registration form

I am good enough to build an entire drupal 7 website but my problem goes below: I am in the process of building a very simple drupal website for all volunteers in my country. So every volunteer will ...
user avatar
2 votes
1 answer
172 views

Custom access callbacks for user entities not being called

I'm trying to implement some custom access control for user entities, in Drupal 7. I've used hook_entity_info_alter to set $entity_info['user']['access callback'] = 'MYMODULE_user_access_callback'; ...
Monkeybrain's user avatar
0 votes
1 answer
91 views

How to make user picture editable without opening edit profile page?

I wanted to allow users to edit profile without going to edit profile page. I found few useful modules like Editable field and Editable fields as link. These modules provide field formatter which make ...
Umair's user avatar
  • 441
0 votes
1 answer
115 views

How to approximate user location on IP&Geoloc maps

I'm using the combinaison of this modules : Address field Geofield Ip&Geoloc Leaflet I need to approximate the location of user's markers on the map for privacy reason. For exemple if somebody ...
Aporie's user avatar
  • 375
0 votes
1 answer
36 views

Why are custom User Account fields not shown after account is saved?

Just upgraded to Drupal 7.54 and now when a user account is saved, any other users (other than admin 1 user) are unable to view or update the custom fields associated with the user account. They just ...
Darren's user avatar
  • 293
0 votes
0 answers
217 views

How to clear cache only for users's field?

I have some cache issues on website when I run some process. I'm looking for a way for clear cache only for user's fields from a custom module. K dn't want clear all cache for save performances. I ...
spacecodeur's user avatar
  • 1,339
1 vote
1 answer
24 views

How to restrict field permissions to referenced user?

I have a submit-review process where submitters choose their reviewer. The reviewers are linked By User Reference module. Submissions are public but have an Accept/Deny review button implemented with ...
geraldo's user avatar
  • 405
1 vote
1 answer
59 views

Profile 2, user relation access? A hard one!

The site contains 2 user types besides admin, lets call the 2 user types "Private" and "Corporate". Private users have a "profile 2" type, where alot of different fields are filled. In a view or ...
Mike's user avatar
  • 33
4 votes
2 answers
890 views

Display roles in profile?

I'm trying to display roles in the default user profile (no profile2) with consistent formatting to the other fields being displayed. In user-profile.tpl.php I have this: <div class="profile"<?...
Samsquanch's user avatar
1 vote
1 answer
101 views

Save certain registration fields elsewhere in database

This is for Drupal 7. I am trying to write my first real custom module but I'm running into some difficulty and I'm just not sure how to look for my answers. I've created a new entity for my module (...
DrupalNoob's user avatar
2 votes
1 answer
34 views

Should I create a role for every user?

On Drupal 7 I have tested many modules, because I simply want in the user view some fields which are public and others can only see friends (user relationship or flag friend, ...). would be nice if I ...
Thoomyy's user avatar
  • 21
1 vote
2 answers
85 views

How to migrate data from custom user account fields to a single new field?

For my Drupal 7 User Accounts I have 5 separate fields (Field Type: Boolean, Widget: 'Single on/off checkbox') used to indicate comms preferences. Without losing any data I want to migrate these ...
Danny Browne's user avatar
1 vote
0 answers
38 views

How do prepopulate a Field Type Postal Address with values from a user profile

I'm using address field module (addressfield-7.x-1.2) and I don't know how to prepopulate the address field from users profile2 (profile2-7.x-1.3) addressfield I managed to prepopulate other single ...
hobbsie's user avatar
  • 53
1 vote
0 answers
12 views

Render a content based on access permission

I have two content_types,Type_A and Type_B. I have referenced one field in Type_B to Type_A by using entity reference type. But when the particular Type_A node is not published,then also anonymous ...
Suraj's user avatar
  • 884
3 votes
3 answers
5k views

How to export all users with all custom fields?

I want to export users list with all custom fields. I have tried the Users Export module but its export only below fields: uid mail name created access login Is there any solution to solve this ...
reshu's user avatar
  • 31
8 votes
2 answers
4k views

How to check for entity access when displaying views fields?

I have a custom entity. There is an access callback defined in hook_entity_info() and it is called when I access the entity. Also in views when I select to display rendered entities, the entity is ...
Neograph734's user avatar
  • 8,449
2 votes
1 answer
79 views

How to calculate user scores based on 3 variables to assign an appropriate text label?

I need to calculate a score for users in D7 based on 3 variables and then assign an appropriate text label and a CSS class. So, using data from Voting API, time ago joined, and number of nodes ...
JohnD's user avatar
  • 53
1 vote
0 answers
134 views

Show/hide entity registration form fields depending on registration state

I'm using the Entity Registration module on Drupal 7. I want to show/hide custom fields on the registration form depending on the state of the registration. I thought to use the Conditional Field ...
Martijn Verbrugh's user avatar
1 vote
2 answers
91 views

Send email to users, except author comments

Hello! I have node with field [field_users] (entity reference) I create rule [after saving new comment] Actions: Loop for field: [comment:node:field-users] inside loop i create var [users:mail] And ...
OnengLar's user avatar
  • 203
1 vote
0 answers
48 views

simple fb connect enter custom user field in field group for new users

I need a help with an issue that I am facing in the module. So, on my registration page I have some extra fields like: Country Real name (different from username) Country and real name value is in ...
Chintan Sureliya's user avatar
1 vote
2 answers
196 views

How to implement moderation of data entered through user profile pages?

I am in need of a means of moderating data entered through a user's profile page, or at least for certain specified fields, both upon initial submission and after any revision. These are fields that ...
Aaron's user avatar
  • 11
0 votes
1 answer
189 views

How to compute and display value of some fields?

I'm facing the issue but not found the way to resolve. is there any way to help me this. The issue is that I want to display the total value (included sum and get percent, etc) of some fields depend ...
Nguyen's user avatar
  • 19
1 vote
0 answers
30 views

Should I still prevent caching of pages with an Address Field?

On the Address Field module page it says there can be problems with Drupal‘s cache and anonymous authors: Address Field should work on any entity type, but if you use it on an entity type that can ...
unor's user avatar
  • 763
6 votes
2 answers
459 views

Which user does the Rules module execute as?

I've set up a rule which is triggered by "after saving a new user account". This rule simply sends an e-mail. The e-mail contains various tokens, one of them is the field [account:field_country]. I'...
sbrattla's user avatar
  • 1,159
1 vote
2 answers
1k views

How to update Blob data in users table?

I am trying to update data filed in users table. Please suggest a way how to update this field data with help of query or need to follow some other approach ? $old_user_id = 123; $new_user_id = 456;...
jas's user avatar
  • 675
2 votes
1 answer
116 views

How to control the display of a user account connected via entity reference

My searches have turned up nothing, I'm sure it is something simple but I can't figure it out. To give a simple version of my set up: I have a content type for publications, that publication has a ...
UltraBob's user avatar
  • 1,339
0 votes
1 answer
36 views

Theme Organic Group Entity Reference on user profile

On my site, users join groups via an Entity Reference field using the "Check boxes/radio buttons" widget. The widget default is to display only the group Title. Like so (where the list bullet is a ...
jay-ess's user avatar
  • 133
1 vote
1 answer
59 views

Display text according to the access to a field

With field permissions, I restrict the access of a field to certain users. I would like to display some text to inform the user that he has no access to the field. I tried it in node.tpl.php : &...
Hgfdsoiu's user avatar
0 votes
1 answer
791 views

Integer user form field with min 11 digits and max 11 digits

I need an integer form field with has a validation of min 11 digits and max 11 digits. In other words; the user has to fill in an 11 digit code. How do i make this field and validation? Update: I ...
meez's user avatar
  • 1,333
1 vote
1 answer
33 views

sharing profile2 fields multisite

I have a site with 2 multi site like abc.com xyz.abc.com zxy.abc.com All sites have same drupal 7 code base. and I shared all users successfully across all portals. my setting file for sub-site ...
Nilesh's user avatar
  • 121
0 votes
1 answer
528 views

How do I get a user profile's picture from entity_metadata_wrapper()?

I am using entity_metadata_wrapper() for getting values from the user profile. This is my code: $user_wrapper = entity_metadata_wrapper('user', $uid); $user_name = $user_wrapper->name->value()...
Neelam Chaudhary's user avatar
2 votes
1 answer
69 views

Having Views searchable by users

I would like to be able to search my views by a field that is generated by an Entity Reference of users of the site. Attempt #1 - Combine Fields Filter I added this filter as exposed with the setting ...
KyleRiggen's user avatar
2 votes
1 answer
139 views

How to create report to list users who change only specific field?

I have a content type with several fields which are updated manually over time by different users. Let's say, for example, the content type name is Ticket and the fields in this content type are: ...
Rami Sedhom's user avatar
0 votes
1 answer
33 views

IEF with custom profile2 type not work

I have node reference field attached to profile2 type entity and I can't add new entity to user profile. Even as admin (uid=1). See my screenshoots for details view user profile add node to user ...
Codium's user avatar
  • 4,953
1 vote
1 answer
120 views

How to make the Rules module block flagged users from sending entityform submissions?

I am trying to create a simple block user functionality on my site. I have a "Block/Unblock User" Flag that other users can block and unblock so they stop getting contact emails from (via entityform) ...
Brandon's user avatar
  • 193
0 votes
2 answers
35 views

Avoid change for users profile fields

Now in my site every logged user are able to change his profile fields (standard fields and custom fields). I am searching a way to avoid this capability for every 'normal' users (in other word i want ...
Bau Miao's user avatar
  • 115