Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
2 answers
161 views

devel module use anonymous user as author in generate content? [duplicate]

i have been created 'job' content type, i used 'Devel module' to generate content of 'job' type, but in some 'jobs' its taking anonymous user as a author, but i don't want anonymous user as author, so ...
user66287's user avatar
3 votes
3 answers
8k views

How to show custom user profile fields in a view?

In Drupal 7, I am using Profile2 (7.x-1.0-beta1) module to add custom fields like 'Author Name' etc to an user's profile page. How do I pull those custom fields in a view (7.x-3.x-dev)? All other ...
Ajinkya Kulkarni's user avatar
3 votes
3 answers
2k views

Redirect to login page if login fails from a login block?

I have a login form block, when a user fail to login to the site I want to redirect him to the user/login page with the usual error message
Nada O's user avatar
  • 193
3 votes
1 answer
1k views

Change user profile image on profile page to activate colorbox

This is for Drupal 7. Currently on the default user profile page, the profile picture just links back to their profile. I'd like to change this so it opens a colorbox. Thoughts? SOLUTION Add the ...
Lester Peabody's user avatar
3 votes
2 answers
137 views

What is a good flexible way to send auto system emails to users? [closed]

I would like to know a good user friendly, easy to setup and flexible way to send automated emails to users. This will be in response to an event triggered by a user. I guess it does not matter what ...
Umair's user avatar
  • 441
3 votes
2 answers
2k views

Noob question about private files and Content Access

This is almost certainly a really stupid question, but the Drupal 7 site we're building has an image gallery that users can upload content to. Unauthenticated users should not be able to see these ...
Owen Blacker's user avatar
3 votes
2 answers
5k views

How to check if this page is user Profile Page

I made a custom User Panel which is similar to Wordpress Top Panel in page.tpl.php so this panel will be shown for every logged-in users on the top of their page. But I want to hide that panel in user-...
rakibtg's user avatar
  • 1,324
3 votes
3 answers
3k views

Implementing a callback after user registration

I want to run a database query in another CRM database after a user has registered. I have the following function in my sugar_crm module eg: function sugar_crm_user_register_submit($form, &$...
Dylan Spencer James's user avatar
3 votes
1 answer
65 views

How to access to the user info on the search page?

When I was trying to resolve this question: How to display the user picture on the search page? I found that in the THEME_preprocess_search_result function I can't access to the user information (I ...
Adrian Cid Almaguer's user avatar
3 votes
3 answers
3k views

Multiple registration forms

I have multiple user role and different registration forms for each role. It means that for each registration form, there are different fields. I when a user select her role, the registration form ...
AmirHossein's user avatar
3 votes
1 answer
77 views

How to display the user registration or profile field on the search page?

How can I render/display user profile or registration field on search result page (user search)?
Adeel Nawaz's user avatar
3 votes
3 answers
157 views

How to control content access based on value of a List (text) field in user profile?

When my users sign up, they must choose whether they are a Man or a Woman, via a List (text) field. If a user chooses "Man", they should only be able to see Woman users on the site. Likewise, if a ...
hockey2112's user avatar
  • 1,244
3 votes
4 answers
6k views

How to export users with passwords?

How to export users with passwords? The Users export module cannot help, it export without passwords.
Vic Nicethemer's user avatar
3 votes
1 answer
81 views

How to display the user picture on the search page?

I want to show the user picture on the search page. Currently only its show the user email or name, but I want to show the user profile picture. How can I do that? Note: the search page is about the ...
Adeel Nawaz's user avatar
3 votes
3 answers
115 views

Display particular Image Style for image based on Role of User?

Using ImageCache Actions there are 2 different Image Styles - e.g. S1 and S2. What needs to happen: User A has Role Y and when s/he views a node/user profile should always be presented with S1 ...
penname's user avatar
  • 159
3 votes
2 answers
321 views

How to force users to re-authenticate on specific pages?

Is there any possibility to Re-Authenticate user especially on specific pages like we see in some websites? Background: for some of the websites like banking sites, when you are initiated fund ...
NTT's user avatar
  • 1,389
3 votes
2 answers
2k views

How to limit block management by role?

In a Drupal 7 site, I want to give users with a certain role the permission to manage some (but not all) blocks. More specifically, only want to allow editing the blocks provided by the Nodeblock ...
marcvangend's user avatar
  • 14.9k
3 votes
1 answer
469 views

How to create a rule to assign roles to users based on some checkbox items in their profile?

I am pretty new to Drupal. I am using Profile2 so that the user can select there own user role. So say I have a profile page with some checkbox items like Automotive Computer Garden etc How would I ...
Ryan Hepple's user avatar
3 votes
4 answers
2k views

How to allow user registration based on roles?

I have two roles on my site: Visitor, the normal user who can register on our site without any admin approval procedure Business role, the business user who can register and add their business to ...
Somya Gupta's user avatar
3 votes
2 answers
3k views

execute a php code after a user login

I see that triggers page is changed from the version 6, It's pretty wierd.. I can't find When user logs in execute a php code thing... What I have to do is exactly that.. control some user roles ...
PartySoft's user avatar
  • 1,046
3 votes
1 answer
311 views

How to assign a section to a specific node with Workbench?

I'm creating nodes using a custom modules $node = new stdClass(); $node->type = $link['content_type']; node_object_prepare($node); $node->uid = $user->uid; $node->name = $user->name; ...
samwell's user avatar
  • 221
3 votes
2 answers
758 views

How to record how much time user has spent on my node?

I want to record the time a user has spent on my particular node so I could show a pop up to the user to register once the user has read 3 article. But the user must have spent at least 30 seconds on ...
Rakesh Verma's user avatar
3 votes
1 answer
3k views

Use Views to display unpublished nodes to authors, but not to other users

Say [User A] creates, but does not publish [Node 1]. [Views V] aggregates all of the content type that [Node 1] belongs into. [User B] should not be able to see [Node 1] listed on [Views V], but [User ...
Peter's user avatar
  • 691
3 votes
5 answers
5k views

Avoid access to profiles (user/%user/view)

I want to avoid access to user/%user/view, so only admins can see profiles. At first I tried with changing the permission user_view_access without any luck. I tried to use the hook hook_menu_alter: ...
penyaskito's user avatar
3 votes
1 answer
2k views

How to add extra save buttons

In Drupal 7, my user profile page is getting really long. If someone sets or forgets a password, they don't see the Save button, and hence their password is not changed. Using the Corolla theme, how ...
user1129's user avatar
3 votes
1 answer
174 views

add user to role

i'm trying to create custom drupal 7 module , i'm using 'user_roles()' function to get all the roles in the system , and then i assign those roles to checkboxes API Form Control $form['roles_group'...
YassineEdouiri's user avatar
3 votes
1 answer
106 views

How to implement User roles for specific taxonomies?

Some info about what I'm working on: I have a taxonomy on my site called 'countries'. I have three 'countries' terms: "UK", "USA", "AUS" I have created a new user role in Drupal 7 called '...
ElNariz's user avatar
  • 35
3 votes
2 answers
10k views

Where does Drupal 7 store custom user account fields?

I imported 8500+ external users from an external user table using Feeds module successfully. Now, I am trying to add some more attributes to these users (ie. age, gender, ...). I proceeded to create ...
chlong's user avatar
  • 653
2 votes
1 answer
6k views

Problems with Services and CSRF token

I've been trying to create a user via webservice without doing any custom coding or curl. This post got me 75% there: How to create test_endpoint? I finally got it working, but only by passing in my ...
bfuzze's user avatar
  • 151
2 votes
2 answers
2k views

Is there an hook_node_access() equivalent for users?

Is there any way in Drupal to control access to users like it's done in hook_node_access() for nodes? I'm looking for something like hook_user_access() or hook_entity_access(). I have an entity ...
milkovsky's user avatar
  • 5,364
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
2 answers
1k views

How to Collapse "Locale settings" (TimeZone) in User Profile with hook_form_FORM_ID_alter();

I cannot seem to get "Locale settings" fieldset to collapse using hook_form_FORM_ID_alter(). Here is what I've tried so far. function fsrsys_form_user_profile_form_alter(&$form, &$...
Citricguy's user avatar
  • 7,934
2 votes
1 answer
3k views

Set a page to be only viewed by users who are logged in

I have created a page that I would like to be visible only for logged in users and admin.
pal4life's user avatar
  • 554
2 votes
1 answer
2k views

Custom filter for Profile2 data

I have to develop a drupal site that allows authenticated users to create personal profiles with data such as interests, personal details, educations, etc. I created a profile2 type with all needed ...
Andreas W. Wylach's user avatar
2 votes
3 answers
1k views

How obtain the uid of the logged user as a related field in a view?

I have a view showing the nodes of a content type, and I want to show the user ID of the currently logged-in user as a field in view, but I can't find how to add the user ID of the currently logged-in ...
Adrian Cid Almaguer's user avatar
2 votes
1 answer
348 views

Votingapi REST server call internal server error - 'services exception: missing entity ID'

I am trying to post votes to 'fivestar' ratings on my D7 site, through my iOS app (xcode7, swift2). My iOS swift API to post a vote to the votingapi REST services post gives me a 200 status ok, and no ...
Dimitri T's user avatar
  • 151
2 votes
2 answers
528 views

Assigning a role in code isn't working

I want to add a user to a role when a checkbox on the profile has been checked. It's printing the dpm() message but not adding the user to the role. What am I missing. function ...
uwe's user avatar
  • 12k
2 votes
3 answers
1k views

How to create a view of all recent activity on a site?

I want to create either a view or a module (preferably view) to display all recent activity on the site such as a new user joined in, a user read some article or blog, a user gained some points and so ...
why's user avatar
  • 1,147
2 votes
3 answers
8k views

Customize the user-edit page

I want to customize the user-edit page. So in my template.php in my custom theme i direct Drupal to look for my custom template as: function mytheme_theme() { return array( // The form ID '...
why's user avatar
  • 1,147
2 votes
3 answers
520 views

Forbid the publication

I created a new role for the user to write. How do I forbid the publication to a redactor?
Onita's user avatar
  • 714
2 votes
2 answers
390 views

Views to display nodes based on ACL permission

I'm trying to use Flexiaccess with ACL to build a view based on node that the user has access granted by Flexiaccess. I found this on Drupal.org, it's the same use case, but is not working for me ...
Krlos's user avatar
  • 39
2 votes
1 answer
2k views

Login link with destination

I am trying to create a login link in Drupal 7 that will keep the destination if set generate a destination based on the page on which the link was clicked if not set persist if set on subsequent ...
user13104's user avatar
2 votes
1 answer
2k views

move fields in the user profile form in fieldsets

I want to move the email address fields in the user profile form (user/1/edit) in a custom fieldset. I have this code: $form['change_mail'] = array( '#type' => 'fieldset', '#title' => '...
Pax's user avatar
  • 319
2 votes
1 answer
1k views

cache_menu items are huge [closed]

Drupal 7.24 I have been stonewalled by an interesting problem on a D7 site. Essentially the cache_menu table was getting very large but not just in items (6300 odd) some of the items are enormous. ...
Adam Purdie's user avatar
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
2 votes
1 answer
216 views

How authenticated users can choose favorite products and show them in their profile? [closed]

in my drupal project, I want to have many products specification. I want authenticated users can choose their favorite product and they can set price for favorite product. these favorite products can ...
Hamed's user avatar
  • 319
2 votes
6 answers
13k views

How to recover drupal password in localhost?

I have a complete Drupal website on localhost. I forgot the password and username for my account. I found the username in the database, but the password is hashed. I can't send emails from localhost, ...
user avatar
2 votes
2 answers
3k views

How do I use field_view_field() to print a user profile picture?

I'm trying to print a user profile's picture in a block that gets displayed on a node page. I have the nodes author be loaded as in the following code: <?php $node = menu_get_object('node'); $...
oobie11's user avatar
  • 1,100
2 votes
2 answers
2k views

Add role on custom register form

I'm using the default register form on a custom page, which I want to use to set a specific role for the user who registers using that custom page. Now I need to know how I add this specific role ...
Daniel Holm's user avatar
2 votes
1 answer
278 views

Programmatically create user in another Drupal site

How can I programmatically create user in another Drupal site? The setup: multisite installation, userbase should be partially shared. Both websites have DB credentials setup in the settings.php file ...
Aram Boyajyan's user avatar