Topics related to users, their user profiles, etc.

learn more… | top users | synonyms (6)

7
votes
3answers
8k views

Redirect /user/login to HTTPS, all other requests to HTTP

I'm using Drupal 7. The login page for my users is located at /user/login, so the default login path. I need that page to be encrypted using SSL so people aren't transmitting their passwords in the ...
2
votes
2answers
3k views

Programmatically assign new users to OG

My site is sud-divided into organic groups. Groups administrators are allowed to create new users, but I need a way to auto-assign the new user to the same group the creating group administrator ...
5
votes
2answers
1k views

2 sites sharing one user table

How can I make 2 Drupal websites share the same user table so when a user is logged in on one they are automatically logged in on the other?
5
votes
4answers
917 views

Distributed authentication system (different domains, separatate databases)

We got multiple small websites (microsites) and one main high traffic one with big users base. Right now the requirement is to build authentication system which should allow users to loign with the ...
3
votes
1answer
2k views

Drupal 7 - Login with external Database

I want my users to be able to login into Drupal with an external user database. I searched for a long time and don't get any module/trick/whatever that is out there. Please help me a little, I'm new ...
3
votes
1answer
6k views

How to programmatically set a custom field?

I am trying to programmatically change a custom field in a user object and I'm having very little success. I want to just use a function to set the field for the object, like field_get_items, except a ...
3
votes
2answers
8k views

Creating a userlist in Views (including custom user fields)

I've encountered an issue using Views 3 in Drupal 7. I want to create a user list with a bunch of fields I added to the user profile (using Drupal's core user fields). I need a list of all users, and ...
3
votes
2answers
770 views

What are the differences between the various OpenID widgets available?

There seems to be several different widgets for providing easer registration and login. I'm curious how they work and what the difference between them are? For example, there is the OpenID selector, ...
2
votes
4answers
859 views

How can I make a block that holds all the information about an articles author?

I would like to add a block into the side bar of all article nodes that contains a mini profile of the user who authored the article. I was wondering if there is an easy way to do this. Thanks
2
votes
2answers
2k views

How can I allow users to cancel their accounts without requiring e-mail confirmation?

In Drupal 7, users can cancel their accounts from the account settings page. However, by default this requires e-mail confirmation. There is an option "Require e-mail verification when a visitor ...
2
votes
5answers
4k views

Use part of the user_profile_form on another page

My users enter a phone number on registration. The amount of values that can be entered is set to unlimited. Setting this changes the field so that you can add another field below to add additional ...
1
vote
1answer
2k views

Extend Drupal 8 User Profiles

I need to build a module to handle Users profiles, and need to extend automatically the basic Drupal user object upon installation. For Drupal 7 I found a way with: field_create_field($field); But ...
1
vote
2answers
2k views

Getting data out of Profile2 with field_get_items()

I am trying to access my profile2 fields in template.php. I get profiledata, but I also get an error message: EntityMalformedException: Missing type profile2. in entity_extract_ids() (row 7663 of /...
10
votes
3answers
11k views

How to track and display selected user activities in a site?

I wonder how to track and display user activities in a Drupal site. Examples of such activities are: posts. comments. page posts. I've found some modules that track the users' activites all over ...
7
votes
3answers
2k views

Is there a hook after user confirmation?

I want to add a content type after a user registers to the site. I tried hook_user_save() but it saves the content type before the user confirms his e-mail. Is there a hook after e-mail confirmation?...
5
votes
2answers
3k views

External site authentication

I apologize if this has been asked many times before, but I'm wondering if anyone has a link to a good tutorial on implementing a working remote authentication system in Drupal 7. I'm new to Drupal. ...
5
votes
6answers
4k views

Is there a module to change the user profile URL?

In Drupal 7, http://example.com/user shows the user profile. Can we change the user profile to http://example.com/username? Do we have a module for this?
4
votes
2answers
3k views

Including multiple authors in Authoring information for a Drupal 7 node

I have a CMS to which many people can possibly provide data. So, I would want to include all the users who have contributed the data for a node by adding new data or moderating existing data, because ...
3
votes
2answers
103 views

How to login-redirect users to their profile page on specific days only?

By using Rules Once per Day module, logged in user would be redirected to profile page on specific day. My issue is, every time when user logged in to the site, the user is redirected to profile page. ...
3
votes
2answers
500 views

How can I authenticate against a non-drupal database?

We have a non-Drupal intranet system built on php/mySQL. We're adding a Drupal install to handle some social functions, and would like (if possible) to not duplicate all of our login information. Is ...
3
votes
2answers
2k views

How to let Drupal use two databases

I want to use an admin specific page to insert or remove new users, instead of using the Drupal administration panel. How can I prescind from the Drupal default database and insert the users' ...
3
votes
4answers
87 views

How to only allow a user to edit his/her own users? [closed]

For instance, my site contains two roles: employer. company. Every company has to be able to add, edit and delete there own employees. As you may understand, companies should not be able to edit ...
3
votes
2answers
4k views

Views and contextual filter as user id from url

I want to create some views that shows the content created by the user, content flagged by the user and so on. I also need that when user a views user b then user a can see the content created by user ...
3
votes
2answers
751 views

How can I get the real password via hook_user_update()?

I want to change the current user password, and get the new password(the real password, not md5 encryption) when edit the account profile via user profile form(e.g.: example.com/user/1/edit) and save. ...
3
votes
2answers
208 views

7.26 /admin, /user not found on Localhost

I am new to Drupal. I developed a site on a server and now migrating it on my personal computer (Windows 8.1). The site is working fine as it should. My problem on localhost is that when I log in to ...
2
votes
2answers
2k views

Form #redirect not working?

I'm trying to make the user creation form redirect back to the home page when you submit it. I'm using Content Profiles so it is two forms sharing a submit button. Even if I set #redirect = '/' on ...
2
votes
2answers
7k views

Theme the User Edit Profile page

I am using the Edit Profile module. This module takes all the fields attached to a user profile and displays them on a separate tab located at yoursite.com/user/[USERID]/edit-profile. I would like ...
2
votes
1answer
2k views

Change page title on user-profile using a field value from Profile2

Normally the /user/uid page shows the username as page-title. I'm using the Profile2 module to leverage more fields to my users, including a 'full name' field which I'd also like to use as the page ...
2
votes
2answers
648 views

Delete user and change Content Author

Is it possible to Delete the user and keep its content as created by the one who deleted the user. Suppose, abc is a user as content creator/editor only and have created 2 contents. abc got fired ...
2
votes
2answers
808 views

How do prevent other users from seeing certain views in a user profile?

I have setup a View which showscertain information to a user, when he/she is logged in provided that logged in user is referenced in the content type containing that information. The View shows this ...
2
votes
2answers
2k views

Programmatic user registration not forcing user to activate account

I'm manually creating a user and then sending a notification email as follows: $new_user = array( 'name' => $username, 'pass' => $password, 'mail' => $email, 'status' => 1, '...
2
votes
1answer
2k views

How do relationships work in Views?

This is related to my previous question, How can I make a block that holds all the information about an articles author? I want to make a block that holds all the information about the user who ...
1
vote
2answers
334 views

Show create content menu item to ananymous users but call URL for login/register popup on click

I thought it would be simple to do, but after lots of searching I couldn't find exact solution for it. So the issue is, I have 2-3 main menu items which I have to show to anonymous users but have to ...
1
vote
2answers
911 views

How to print id of user whose profile I visit rather than id of logged in user?

I would like to print the id of the user on his profile page? How can I do it in Drupal 7. So far I could only print logged in user id..Any advice appreciated.
1
vote
3answers
2k views

Loading bootstrap.inc in external PHP file in a subdirectory

I'm trying to check if there is a user logged into drupal in a PHP script that resides within a subdirectory of the drupal root. I know that there can be issues with calling the bootstrap anywhere ...
0
votes
2answers
184 views

Is there any SIMPLE way to hide errors ONLY for anonymous users?

In almost all the times I searched for literature about disabling system errors\bad-notifications ONLY for anonymous/non-admin users, the result was large-scale discussions with seemingly pretty ...
0
votes
2answers
2k views

How to create a profile page?

I'd like to create a profile page (visible for every visitor) for every user on my website. There should be displayed some personal information about the user (name, date of birth, bio...) and some ...
7
votes
2answers
1k views

How to restrict each user to making only 1 comment per node?

Does anybody know if there is any way I can restrict each site user to making only one comment per node on my Drupal 7 site? I haven't found anything yet. I've just tried a complicated setup with ...
6
votes
2answers
4k views

How to show a menu item for anonymous users only?

I want to show a "Join Now" tab on the main menu for anonymous users only. In the past I used Menu per Role module which does exactly that. Since it's only one tab I would rather use 5 or 10 lines ...
5
votes
3answers
3k views

Force existing users to complete profile after adding required fields

I inherited a Drupal (D7) site with existing users. Now I want to add new fields to the user profile, but they will be required. New users will have to fill out these fields when registering. ...
4
votes
1answer
2k views

Commerce: anonymous checkout not working properly

Anonymous users are supposed to have access to Commerce cart/checkout by default. In my current project cart remains empty for anonymous users, even if an order is created : When an anon. user clicks ...
4
votes
2answers
767 views

Edit account creation message

I'm trying to change the message users see after creating an account. It currently says: Thank you for applying for an account. Your account is currently pending approval by the site administrator. ...
4
votes
3answers
2k views

After logging off, a user is able to see the pages by pressing back button of the browser

I have a requirement in which the user should not be able to see the books in the site unless he is logged in. And the user is not able to see the content. The problem is when a user logs in, views a ...
3
votes
2answers
5k views

How can I create page.tpl for user’s profile page?

Searching in Google I found user-profile.tpl.php , but in fact this is the node of profile page while I want to create page.tpl.php foe the profile page. Also page-user.tpl.php includes login page, ...
3
votes
4answers
5k views

How can i restrict /admin login page to a particular IP only?

I want to restrict the http://www.mysite.com/admin login page to a particular IP only. Do you have any suggestion?
3
votes
2answers
1k views

Unable to set placeholder on password input

function customization_form_user_register_form_alter(&$form, &$form_state, $form_id) { $form['account']['pass']['#attributes']['placeholder'] = t('Password'); } I am trying to set ...
3
votes
3answers
1k views

How to catch the “Login Failed” event?

I want to show a custom block, only when log in has failed. So from visibility settings I have to put a PHP code that returns TRUE only when the login has failed. But how could I "catch" that event? ...
2
votes
3answers
82 views

Redirect users with specified roles to specified term pages

I want to redirect users to one term according their role; for example, if users have the worker role, redirect them to term/8. How can I do this?
1
vote
1answer
514 views

How to access $user_profile in page.tpl.php or $page in user-profile.tpl.php in Drupal 7?

I need to change layout of a profile depending on user's field. So, I need to either include regions in user-profile.tpl.php or access $user_profile to test that field in page.tpl.php. I've seen this ...
1
vote
1answer
268 views

Redirect anonymous users to the register page

Is it possible to redirect anonymous user to user/register page? How can I do that?