Topics related to users, their user profiles, etc.

learn more… | top users | synonyms (1)

20
votes
3answers
11k views

What is the best way to get current user object?

I've always gone with this: global $user However, I seem to remember seeing something in a contributed module somewhere that returned the current user object without using global $user. Does such ...
5
votes
1answer
415 views

Mention/Reply to users in comments using @ (@name)

I am looking for a feature that makes it possible to reply to comments, or mention users in a comment using the @ symbol. So, if I was to write the following in a comment on a node: @Michael ...
4
votes
2answers
1k views

How can I quickly re-save all users on my site?

Very similar to this question except I need to save users, not nodes. Use case: I added a field (single boolean) to a feature so that the field is added to user profiles. I then pushed the feature ...
5
votes
2answers
952 views

Why do I have to enter a recipient after selecting users in the VBO send emails operation?

I'm using VBO module in D7. I created a table view listing users by some filter criteria. I want to send a mass mail to selected users. I'm using the VBO field bulk operations: user and selected the ...
2
votes
3answers
3k views

How to modify user messages without hacking core user module?

When "themeing" modules, especially core modules, as far as I know it is a good idea to take the module specific tpl.php files, duplicate the ones you need, and modify them once they're in the ...
6
votes
1answer
1k views

How to allow special character in username?

Is there any way to allow the special character in username like "#" and "~"?
5
votes
1answer
869 views

Display the user edit-picture form in custom block in Drupal 7

I am trying to customize the user edit page in Drupal7 using Panels for user-edit page. How can i display the user edit-picture form in any specific region in Drupal 7. In my panels, i added a custom ...
3
votes
2answers
349 views

How to allow a role to add users without giving them a password?

I have a situation where I would like a specific user role be able to add users without assigning them a password but I can't seem to find a way to do this. Has anyone done this before? I feel like ...
3
votes
3answers
221 views

How to approve comments from a user with previously approved comments

WordPress has a useful option for comment moderation in its Discussion Settings panel called "Before a comment appears: Comment author must have a previously approved comment". How can one ...
3
votes
3answers
2k 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 ...
2
votes
2answers
1k views

Force drupal 7 to place “www” in front of urls

there is a problem when a use logs in after typing "domain.com", clicks on a internal link that leads to "www.domain.com/somthing" and they are no longer logged in until they navigate to "domain.com" ...
2
votes
1answer
1k views

How to set Drush sql-sync not to clone users between @dev and @staging?

As I wrote in my previous question, I am using the following drush commands to synchronize development and staging environments. drush rsync @dev @staging drush sql-sync @dev @staging How to set ...
1
vote
3answers
51 views

Show step-by-step dialogs for helping user with using the site

I built an app with Drupal, and I would like to add step-by-step dialogs to help users learn how to use the app. I found some boostrap plugins, but I would like to know if there is already a Drupal ...
0
votes
0answers
17 views

Is there a way to test or spoof different user access? [duplicate]

Possible Duplicate: Multi-user/role testing, best practices My current style in testing different user access is opening a different browser or opening a private session and logging into a ...
0
votes
1answer
452 views

Can't show custom user field on nodes

This is a follow up question to: How do I show user attributes on articles? I still can't get the "Twitter URL" field to show up on articles, and got tired of reading through the Fields API docs; I ...
6
votes
4answers
160 views

How do I limit the number of nodes posted by a user to an entity referenced node?

I have created a content-type with the name "Reviews". I am referencing another content-type "Books" using the Entity Reference module. How do limited the number of reviews posted per book to 1 per ...
4
votes
5answers
2k views

Is it possible to allow duplicate usernames ?

I'm working on a Community Website and 99% of the time a new user has an unique username. But for my requirement, it is required to allow duplicate usernames. Is there a way to change drupal default ...
4
votes
3answers
3k views

How to programmatically list users with a certain role?

What is the preferred way of programmatically generating a list of users with a certain role? (I know how to do it with a database query, but surely there's a higher-level method.)
4
votes
3answers
3k views

User logout when browser closes

Is there a way to automatically log out users when they close a browser? I've tried to set (settings.php) ini_set('session.gc_maxlifetime', 0); ini_set('session.cookie_lifetime', 0); but this ...
3
votes
3answers
52 views

Is there a way to prevent a user from seeing a field on their user profile page?

I'm looking to create a 'Last Updated' field in a user's profile. I was then going to create a rule that filled that field with the current date everytime the user's profile was edited. I want the ...
3
votes
3answers
2k views

Restrict forum access based on user (user list)

I need to restrict access to forums so that only selected users can access an individual forum. (The users should apply for a forum and a moderator should decide if the user should be allowed to ...
3
votes
5answers
9k views

How to delete 'blocked' users in bulk?

There are a spammer(s) out there constantly creating accounts on my site. The accounts are 'blocked' by default so they do not pose a problem, nor does the spammer gain anything from them. Still, I ...
3
votes
2answers
4k views

How to change the size of the avatar in Drupal 7?

When i visualize user avatar in Drupal 7 using this code: $account = user_load(2); print theme('user_picture', array('account' => $account)); The following image is generated: <a ...
2
votes
2answers
7k 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 ...
2
votes
4answers
1k views

Allow users to edit the list of CCK allowed values for “select list”

I have a CCK field ("City") that is a select list, and has manually entered cities in the allowed values list. I added these cities (as the administrator of the website) but I would like to hand ...
1
vote
1answer
134 views

how could the global $user be different between the Drupal interface and Services module?

If i do: hook_node_view($node, $view_mode, $langcode) { global $user; var_dump($user); die(); // i get the correct dump of the current pre-authorized user } HOWEVER, ...
1
vote
2answers
332 views

Programmatically create user reference field

I want to add a user reference field in taxonomy term. I create field and it's instance: $field = ['field_name' => 'mymodule_employee', 'label' => t('Employee'), 'type' => ...
1
vote
3answers
138 views

Give some users (e.g., teachers) access to nodes created by a unique subset of other users (that teacher's students)

My site has roles for administrators, students, and teachers. Students create nodes, and each student has exactly one teacher. Teachers should be able to view all content created by their students, ...
1
vote
4answers
1k views

How can I assign users different profile pictures upon registration based on gender?

My setup: I am on Drupal 7 but not using the default user profile pictures; instead, I have a custom image field, profile_picture, which is attached to the user profile. When users register, they ...
1
vote
1answer
766 views

User login using a token or ID (no password)

How I am able to create a form/link to let assigned/special users to log-in to the system without entering their username and password? I want them to be able to use a link/token to login to system ...
1
vote
2answers
2k 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'); ...
1
vote
1answer
238 views

How do I show user attributes on articles?

I added a custom field "Twitter URL" to each of my users (on the page Home » Administration » Configuration » People » Account settings). I'm trying to display this "Twitter URL" on every article that ...
0
votes
0answers
38 views

upload image by user and display images in her/his profile if admin accept uploaded image to display

I want the users to add their images; the administrator should be able to accept the images, which would then be visible on the user profiles. I create the gallery using the help from ...
0
votes
1answer
151 views

How can I make a link from content profile node to it's user account page?

I'm trying to find out how to make a direct link from content profile node view/edit page to it's account page. As an admin role when I check somebody's profile node I sometimes also need to check ...
4
votes
2answers
5k views

How to customize user edit page drupal 7?

I need to change the order in which things are on the user edit page in Drupal 7. I have tried modifying page-user-edit.tpl.php and user-profile-edit.tpl.php, but it doesn't seem to ever get there. ...
4
votes
3answers
559 views

How to create a view that searches nodes and users at the same time?

I'm creating a custom search to my site using Views. I want to search both nodes and users at the same time, with exposed filters like this: [ ] events [ ] bands [ ] products [x] users But ...
3
votes
2answers
4k views

User Registration to appear in a block

I want the user registration to appear in a block in some other page than home, let's say a page called "Sign up." What I want to achieve is the following.
3
votes
2answers
2k views

fetching user photo or image URL

i am trying to fetch loged in users photo to make a welcome block. i have applied a code which is not working $userphoto = $user->picture; so what to do to fetching user photo or image URL, any ...
3
votes
3answers
634 views

How do I redirect users from the registration page to Paypal?

Only users with a "Sign Up Code" are allowed to sign up to the website. If they provide a valid signup code, they will be directed to a sign up page where they can provide user information, and PayPal ...
3
votes
2answers
133 views

Set the role of users when you're not the administrator user

Is it possible to do this? I can't see any permission I can grant for roles. I want to let a user create other users, but only of a specific role.
2
votes
3answers
309 views

How to implement a Dropbox-like functionality for authenticated users to upload files?

I want to give my users some sort of upload functionality - kind of like a Dropbox. The Dropbox client module seems to have many bugs and the patches aren't fixing them for me. So basically I am ...
2
votes
2answers
261 views

remove 'publishing options' and other settings from node/add

I have a role which allows users to add nodes, viewing the admin form, but I don't want the user to be able to see Is there a way to remove it?
2
votes
2answers
387 views

How to get notified when a user is blocked?

Is there a way to get notified when a user is blocked ? like a hook in user module or ? or there are another way ?
2
votes
3answers
5k 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 ...
2
votes
1answer
1k views

how to get password as submitted by the user in hook_user_insert?

I have extended the core using hook_user_insert. but when i print the $edit argument inside the function i get password fields as encrypted. Is there any way i can get the non-encrypted value of ...
2
votes
4answers
111 views

Is it possible to make a second “edit account” page that only allows users to edit some profile fields?

So here is my situation: users on my site have to fill out a rather large number of fields upon registration. However, after they register, only four (out of about ten) of these fields need to be ...
2
votes
1answer
1k views

List all revison users on a node

I want to list all the users who have ever contributed to the revisions of a node.
2
votes
3answers
171 views

Unable to use user fields from the global variable $user

I have created a module where I am declaring $user as global variable in hook_init(). I can access the values of $user->x_field in page.tpl.php. When I try to use $user->x_field in ...
2
votes
4answers
1k views

Override user pages with a view

Is it possible to override a user page with a view? I would like to override the user page to show all the nodes created by that user.
2
votes
1answer
2k 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.