All Questions
294 questions
7
votes
2
answers
5k
views
Disable editing of a node after it has been published
Scenario:
A user can create a node (content type "story"). All story nodes that are created are unpublished by default.
I have a boolean field called "publish my story". Once this has been checked ...
7
votes
4
answers
16k
views
How to export users to a CSV file?
I would like to export users into a CSV in Drupal 7. I believe I can use the module Views Data Export, but I am not sure how to do that or if it is the correct module I would like.
7
votes
4
answers
11k
views
Theming user_profile_form (the user edit form)
I am looking for easy ways to theme the user profile form that will allow me to setup a two-column layout for the form and exclude certain elements.
How can I achieve it?
6
votes
2
answers
2k
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?
6
votes
2
answers
4k
views
Create user on content creation
In a "course" content type, I have an "instructor name" field, which points to a registered user.
When the "course" content is saved, I need to check if there are any registered users with the name ...
5
votes
2
answers
3k
views
External site authentication [closed]
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
2
answers
12k
views
Adding custom actions to rules
I am trying to add custom actions, events and conditions to work with Rules interface. I began by adding custom actions by creating a custom module. Here's my code till now.
rules_example.info :
...
5
votes
1
answer
5k
views
How to create custom rules action event conditions?
Is there any universal formula or module to create custom rules actions, events and conditions? So that I just have to replace the required values and rest of the code remains the same. I searched, ...
4
votes
3
answers
7k
views
Restrict acces to file field only to certain role
I have a node-type called "download" that has a field "file" with unlimited entries. Those files are already stored inside a private path. Now I want to restrict access only to a certain role. I ...
3
votes
2
answers
146
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
3
answers
6k
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
1
answer
7k
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
4
answers
375
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
2
answers
6k
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
3
answers
1k
views
Is there any easy way to set the default author for a node being edited to the current author if it is currently anonymous?
The site I am working on has a lot of Anonymous nodes because it is a migration from a system that didn't have a proper user system. Users can claim their articles by going in and editing the node ...
3
votes
5
answers
5k
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 ...
3
votes
3
answers
3k
views
Show teasers to anonymous visitors but not allow access to the body/node
I want to encourage visitors to create an account by allowing them to read the teasers on the front page and know that creating an account is worth their effort to access the rest of the content.
i'm ...
3
votes
2
answers
2k
views
Complex View Contextual Filter with User Relationships — how would I achieve this?
As I mentioned in the question I raised earlier this week, I'm using User Relationships to create unidirectional friendships between users on my site.
The friending paradigm is like Twitter, where ...
3
votes
3
answers
4k
views
Users can't log in sometimes
Drupal 7.5, PHP 5.6.27 Debian 8, remote host.
We are running into a problem where some people can't log in some of the time and sometimes it works if they try multiple times. Users have reported the ...
3
votes
2
answers
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
2
answers
915
views
How to report about how many users have registered in a given timeframe?
We want to know how many users registered to our website as a report.
I'm looking for a way (or a solution) in D7 that allows me to give me a report of how many user have registered to my website. ...
2
votes
2
answers
3k
views
Programmatically assign new users to OG
My site is sub-divided into organic groups.
Group administrators are allowed to create new users, but I need a way to auto-assign the new user to the same organic group the creating group ...
2
votes
2
answers
520
views
How to limit access of a view about Group Memberships to the Group's administrator?
I use the modules "Group" and "Views" to display to the administrators of the groups, the lists of their members.
My problem :
user1 is the administrator of group1.
user2 is the administrator of ...
2
votes
1
answer
3k
views
How to share user and user profile in a multisite environment? [duplicate]
Possible Duplicate:
How do I create a multisite, sharing users and nodes?
How to share user and user profile in a multisite environment?
My question was about the whole process to get the ...
2
votes
1
answer
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 ...
2
votes
1
answer
3k
views
Changing the layout of user profile edit page
I am working on a website based on Drupal Commons.
It uses Commons Profile Module to add extra fields to add user information.
I want to accomplish two tasks:
Change the layout of User Profile edit ...
2
votes
3
answers
3k
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
3
answers
1k
views
How to display a block to a specific user?
I need to display a block just to a specific user.
I don't want to create a role just for a user. that does not make sense!
2
votes
2
answers
3k
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
2
answers
757
views
What's the explanation for my product permission issue in a Drupal Commerce view?
I'm very confused with some permissions and product displays in Views. Maybe you can help me to understand it.
I'm trying to make a view of product displays. In the view I include a relationship for ...
2
votes
3
answers
2k
views
Move user profiles under a menu item
In Drupal 7, currently when I go to a user profile, the breadcrumbs go as follows: "Home > username."
I have a People section as part of my main navigation, so I would like the breadcrumbs to behave ...
1
vote
3
answers
3k
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 ...
1
vote
2
answers
380
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
3
answers
313
views
Does anonymous can access current node? How to check it in my module?
I need to do something witn current node by my module only if anonymous users can view this node. How to check it?
By default I use $node->status == 1, but some other modules can change anonymous ...
1
vote
2
answers
726
views
How to grant permissions for some role to execute custom Rules Components?
I created a view (table) and i asociated views bulk operations. I created 4 rules components. I have permissions only for user/1 (admin). Another user role (eg. editor) can't see these options. "...
1
vote
1
answer
537
views
Is there a way to restrict some pages like node/add, /user/login and more?
Can we restrict some page like
node/add
/user
/user/register - as I dont have login/registration page at all
/user/login
node/200 or node/500 - so that may be of any content type
and it should be ...
1
vote
1
answer
72
views
Multiple registration phases
I'm having trouble figuring out how to have a registration in different phases. This is what I would like to do:
A user registers with a name and an email or register with facebook.
He will receive ...
1
vote
4
answers
907
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
1
vote
2
answers
11k
views
Private File System and User Access
Is there a way to protect Drupal files from being accessible by the file path (putting http://www.domain.com/files/image.jpg) in the browser URL from users poking around?
0
votes
1
answer
607
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 ...
0
votes
1
answer
1k
views
Views: Filtering nodes on the basis of logged in user role
Is it possible to filter out nodes with respect to current user role? For example, I want to create a view where users can see the all the published nodes as well as the unpublished nodes they have ...
0
votes
3
answers
1k
views
sharing authentication within two drupal distributions
I am looking for a module or a way where two different drupal distributions can share the same authentication or user database ? Is there a module that can help with that ?
possibilities-
if user A ...
0
votes
2
answers
5k
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 ...
0
votes
2
answers
157
views
How to redirect a newly registered user to a custom URL after signing up?
By default after a new user signs up, a redirect to the home page happens.
But in such case I want to redirect such user to another page like node/35.
In this node/35 I then want to display some ...
0
votes
2
answers
911
views
email address not appearing in user profile
I am using drupal 7 default user_register module, when a user registers with all the required fields, it successfully registers but when I click that user in people> tab his/her profile is ...
-2
votes
3
answers
498
views
How to create a rule to email all users with a profile field X with same value as the current-user?
I'm using Drupal 7.57 and I have 2 roles in my website, role X and role Y.
I want to compare a field (field_code_postal) of the X member profile of the current-user, with the fields (...
26
votes
3
answers
21k
views
How to assign permissions to roles programmatically?
I have some permissions that I would like to assign to some roles programmatically for easier installation.
Because I'm installing the module and creating both permission and roles, I don't have the ...
17
votes
5
answers
7k
views
How to restrict access to the site during development?
I am creating a new Drupal 7 based site.
The development will be on a server that is publicly accessible. I am working in a multi-site environment.
I would like to totally block access to the site ...
12
votes
6
answers
5k
views
How to restrict direct access to the nodes?
How to restrict direct access to the nodes but just allow views to access the required field of the particular node type?
For example in Views Slideshow we are sliding the image field that belongs to ...
11
votes
4
answers
16k
views
Give permission to manage users but not permissions
We have setup a site in Drupal 7 on which we would like certain users to have access to the user management page, and be able to create new users, assign roles, etc., but we don't want to give them ...