Questions tagged [users]
Use it for question about the user entity. Don't use it for a generic question about, for example, what users can do on a site.
6,527
questions
1
vote
2
answers
887
views
Missing "view mode" permission in core
Context
Drupal 8
Switching to Drupal for intranet site in large organization
Background
OtraganixLocker Corporation is switching to Drupal from a custom-made home-grown intranet site. They want to ...
1
vote
2
answers
833
views
How do I add a super admin, either programmatically or directly through the database or another
$new_user = array(
'name' => 'Sg',
'mail' => '[email protected]',
'pass' => 'password123',
'status' => 1,
'field_custom_first_name' => array(LANGUAGE_NONE => array(array('value' ...
1
vote
1
answer
67
views
content access does not work after changing domain
after designing and developing a website I changed its domain. Now any of the permissions are not working. every thing is OK appearently but the functionality is not OK at all.(I mean all the ...
1
vote
0
answers
38
views
User Account Block
I need to change the hyperlink of the "log in" tab in the user account block. The original hyperlink directs to (/drupal/user) and I want to change it to direct to some place else. Does anybody know ...
0
votes
0
answers
24
views
Comment Field, 'Your Name,' Will Not Accept Un-Registered Names
We want anonymous users to be able to leave comments with their names. However, even though I've set anonymous commenting on the appropriate content type to 'Anonymous posters must leave their contact ...
0
votes
1
answer
1k
views
Drupal 7, login, "form_build_id" not used?
I write some functional tests for my website.
I have this test :
go to login page
post username/pass/form_build_id
check if the user is connected
In the test script, my form-build-id is "hardcoded". ...
2
votes
2
answers
1k
views
Anonymous user cache issue
We're having a problem with caching that is affecting anonymous users.
We have a form in a block that when the user fills out the form, they are able to download a PDF. We hide the block on pages ...
1
vote
1
answer
161
views
Login success but logout fails
I'm trying to customize login, logout functionality in my drupal site. My custom login function works fine by using the below code:
function my_module_custom_login() {
$username = $_POST['username']...
0
votes
0
answers
681
views
Load custom fields with entityQuery
I'm trying to load a user by it's uid via an Entity Query, this seems to work, however i'm missing my custom fields defined on the Entity User.
I'm getting all the default fields like 'username', '...
0
votes
4
answers
297
views
Display users created only by the current user in Admin/People
Below is the site's user access level hiearchy:
There is a user myid_administrator which has a role MYID ORGANIZATION ADMINISTRATOR. The administrator, aegono, had enabled 'Administer users' to ...
0
votes
1
answer
3k
views
How to programmatically add options to list_text field [closed]
I want to programmatically add a drop down list field to the user profile via a custom module. How do I go about adding select options for the field?
// Create Field
'suffix' => array(
'...
-1
votes
1
answer
43
views
How to create a user and only allow him to add users?
I have my system user roles, in the first image below:
I want my user level access to be like the second image.
I am the administrator of the site, I want to create a user with a role MyID ...
0
votes
1
answer
28
views
What are some specific reasons NOT to share a users database table between sites?
I'm building a site for a client, and surprise! Turns out they're using a shared users table between multiple Drupal 7 sites (completely different code bases, different config, etc). I'm only supposed ...
0
votes
1
answer
107
views
How to get the users who did not submit articles?
Every day people are expected to post 1 node of content type "Article" on my site. If they missed to post such article, then I need to somehow produce a message "Your article is pending" to those ...
2
votes
2
answers
43
views
How to let users mark ( like) other users?
In my project I'd like to let users to mark (kinda like) other users.
What solution should I use? Appreciate any feedback.
1
vote
0
answers
36
views
Content related to role and user creation time
I want to show content to the user which belongs to his role, such as taxonomy,
its creation time, or another user custom field. Is there any way to do this in Drupal 8?
To Clarify my Question:
I ...
0
votes
1
answer
43
views
How do I get a list of nodes that have a reference to a given user?
I can get a node's referenced users like so:
$users = $node->get('field_allowed_editors')->getValue();
But how can I get a reverse list? Getting all the nodes that have a certain user ...
1
vote
2
answers
1k
views
custom user login/register menu tabs
I'm making a website with 2 different kind of users. using the Profile2 module, and i'm kind of stuck.
Tourists who register with the normal user/register form.
And Guides who register with a ...
2
votes
2
answers
1k
views
Login with Facebook or Google+ account
I want users to be able to log in (signup) in site with their Facebook or Google plus account. But I didn't find anything for Drupal 8.
Is there any module or solution for doing this job or I should ...
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 ...
2
votes
1
answer
175
views
How can I send an email to the previous comment author when a user places a new comment?
I want to get the Email address of last comment's author. Actually, I want to send email by creating a rule when new comment posted and this email will go to the user who commented on node before ...
0
votes
1
answer
29
views
Assign email on user registeration
I have a custom user email field,
I want when the user signs up to automatically set the email for he/she.
For example, when the username field is user1 I want set the email to [email protected] ...
3
votes
1
answer
4k
views
Access denied on hello world custom module [closed]
I installed Drupal 8 on a Debian VPS server.
Some installed themes don't work; some themes do work.
After I created a simple Hello World module and tried to access its page, I got an Access denied ...
0
votes
1
answer
414
views
You are not authorized to access this page with blocks displayed
I made a custom module in Drupal 7 with a simple page.
I used hook_menu to make permission :
function mymodule_menu() {
$items = array();
$items['prestart'] = array(
'title' ...
1
vote
1
answer
224
views
List users with custom fields
Is there way to list all users? I haven't found such method on UserInterface. The few hints I found on internet are for version 7 or using entityManager which is deprecated. Loading custom fields is a ...
0
votes
0
answers
292
views
How to force a login on a specific page only?
I would like to create a page (with a specific url) which will always require/force the user to login with their credentials. This would need to work irrespective of whether they were already logged ...
1
vote
0
answers
202
views
How to add permissions I have to another user in Drupal 8?
I have two roles, editor and employee. "A" user is in editor role and can change permissions, for example he can add users to employee role or remove them. However, it would be good that users in ...
1
vote
1
answer
99
views
Allow users to register using username in drupal commons throw Integrity constraint violation error
I'm using drupal commons and I want to allow user to pick his username on registration.
Currently drupal commons does not allow user to choose his own username but generates one automatically.
What ...
0
votes
1
answer
989
views
Filter by field user role permission
I have created View permission field in the events content type. Its field type is Role, so I can select which roles can see the node.
This works fine, but when I add events content type in the view ...
3
votes
1
answer
87
views
How to limit access to content to only users with the same role as the content author?
I'm having trouble in my Drupal the Views and I don't really know how to solve it.
Let's suppose that we have two roles named Org1 and Org2. We can have more than one user per role so for example:
A ...
0
votes
1
answer
42
views
How do I adjust the 'Create New Account' settings?
New registrations are asked to create a password which is, in my opinion, excessively strong. Where do I go to adjust the password strength and other 'new account' settings? When I looked in the ...
1
vote
1
answer
96
views
How do I use the geoip_language_redirect module?
I am working on a multilingual website, and I have setup the multilingual concept successfully.
Now I want to redirect the users to the corresponding language URL based on the IP address or country. ...
2
votes
1
answer
228
views
REST interface to custom entity type getting constant 403's
I created my module and the entity definition using the drupal console. It has not been modified at all. My entity is for a user but for various reasons I won't be using the pre existing user entity.
...
1
vote
1
answer
372
views
hook_user_insert not working
I am new to drupal.
When user register into my website I need to get the users details and passed to a thirty for server .
I am trying the following hook,
function compass_preprocess_user_insert(&...
0
votes
2
answers
65
views
How to allow anonymous users to view page?
I would like to make a new page, before publishing it I'd like to send it to other people to review/approve the content without having to log in.
Is this possible?
0
votes
1
answer
18
views
Restricting view to content associated with user profile
On my site some users have the permission to see others' profile.
I'm looking to show a view in a block containing a food content type. It will be displayed on the profile page of the users (user/*). ...
1
vote
0
answers
50
views
How to restrict user role to see only their members profile?
I am using Group module and I created a new role: moderator
Here's my group:
Company A - Moderator role
Company A1 - Member role
Company A2 - Member role
How can I restrict the companies profile ...
0
votes
1
answer
198
views
Emails are not sent to outside domains
I deployed a Drupal 8 website, on a hosting service with cPanel, with domain mydomain.com.
If I set this email address on the user profile: [email protected], that is an email address with a ...
3
votes
2
answers
1k
views
How to track Drupal user login-logout session length and registration activities?
Is there any hook_function/code in Drupal where I can track user activity, like:
User core logged in time / or third party login
User log out time
Login-Logout session length (active time)
...
1
vote
1
answer
88
views
Webform draft share link
I would like to create a webform which accepts input from two parties. First party fills out part of a form and share a link with second party to proceed with the rest.
I have found 'save draft' ...
1
vote
5
answers
3k
views
Show menu links for anonymous users only
I need to show the user register link as a menu item in the account menu. I am able to add the link in the menu via links.menu.yml.
The menu links shows up for anonymous users as well as ...
2
votes
4
answers
996
views
How to create a views filter for users who have never accessed a site?
I have a view where I am trying to show all users who have a last access value of never, meaning they have never logged in.
The filter however expects a Date value which is no help to me because I ...
1
vote
0
answers
24
views
Can a person that doesn't have access to a page, view an unpublished article to review?
Can a person that doesn't have access to the backend of my website view an unpublished page?
I.e I want to set up an article but need someone to review before I can publish it. I can't give this ...
1
vote
3
answers
79
views
How to send an email to a specific user on new account creation using Rules?
I have an alumni association portal. When a new user creates profile on the portal, that account stays blocked until a specific user from that batch/department approves it.
I am trying to make use ...
2
votes
2
answers
743
views
Access Denied when I try to flush cache or change theme
This is a very odd issue. Logged in as admin. All permissions given to admin. But Access Denied page when I try to flush cache or change theme. I can flush the cache with drush. I tried switching ...
1
vote
5
answers
2k
views
How to show a user login form on a completely separate page? [duplicate]
I am developing a application where I want to restrict everything from anonymous users. If anyone tries to access any page from url directly they will be redirected to login page. How to do this?
...
4
votes
0
answers
484
views
How do I multisite with share user (and SSO), separate/dedicated users' role and content database on each site [closed]
I like to make Drupal 8 in CentOS 7 with Apache 2.4, mySQL and PHP 5.6 environment with requirements:
Multi-site within domain (site0.example.org, site1.example.org, etc.)
Shared local user account ...
1
vote
1
answer
49
views
An explanation on user_save() works
I was writing on a module for drupal and i had to update some fields in the user-object. I first tried this code:
$account = user_load($user->uid); // Loading account
$edit = array(
'...
0
votes
1
answer
32
views
Management of priorities with node_access
I do not understand how priorities are set for the node_grants... I have a module node_grants function that provides 4 grant ids for the user, but some nodes only have 2 gids... how do I know which ...
1
vote
0
answers
15
views
User can't change their own location after registration anymore
i'm using the loaction module for user locations. At the registration form a new user has to enter his oder her location and it will be displayed in his profile. When the user tries to edit his or her ...