Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
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.
7
votes
Accepted
Creating an alternative login page other than /user/login
However, do bear in mind that if you want to replace the /user/login form, you will need to think about all scenarios in which users might end up there (e.g. … Here are the basics:
Redirecting
If you want to redirect users from /user/login to /authenticate for whatever reason, you will either need to use the Redirect module, or implement hook_menu_alter() in …
14
votes
Programmatically create a user account
For Drupal 8, the code to create a user entity is the following one.
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();
$user = \Drupal\user\Entity\User::create();
// Mandatory.
…
2
votes
How to restrict moderators to only access a limited set of users?
If moderators are creating the Company nodes themselves, you will probably be best off with the Content Access module.
If Company nodes are created by administrators, you could use the Node access us …
5
votes
Accepted
How to edit one time login URL?
Without them, it would be easier to reset passwords of other users, including the super administrator (uid: 1) for example. … All of this was made so your users and your site would be more secure. …
0
votes
Accepted
Simplenews newsletter unsubscribe page- Access denied
The access arguments for that page are subscribe to newsletters, meaning that you need to grant that permission to anonymous users, in order to allow them to unsubscribe without logging in. … Grant the permission to anonymous users.
Note: I just told you how to allow to do it for everyone. You need to evaluate if this fits your website and workflows. …
1
vote
Display regions in user-profile.tpl.php
For anyone wondering about this, here's how to do it (code goes in your theme's template.php file):
function YOUR_THEME_preprocess_user_profile(&$variables) {
$variables['YOUR_NODE_REGION'] = block …
9
votes
Render login Form
(This code would go to YOUR_THEME.theme file.)
function YOUR_THEME_preprocess_page(&$variables) {
// You will most likely want to show and render the form for anonymous users. …
1
vote
Accepted
Add user email and username under the "View" tab at /user/%
Here's how to do that:
Create a new view, choose to show "Users" and create only a block.
Add "E-mail" field.
Add "Contextual filter" for the "User: Uid" field. …
1
vote
Accepted
Problem with token when unchecked "Enable signatures" and "Enable user pictures"
That error is showing up because you are using wrong names of the tokens.
[sito: login-url] should be [site:login-url].
[site: url-breve] should be [site:url].
0
votes
Enable/ Disable elements under 'edit' depending on role
As I understand your question, you need the Field Permissions module. From the project page:
The Field Permissions module allows site administrators to set field-level permissions to edit, view an …
1
vote
Accepted
How can I check the user status of node author in Rules condition?
You need to use the double equation sign. What your code does right now, is that it assigns the value 0 to $author->status.
Here's updated code:
return $author->status == 0;
0
votes
Forcefully logout user from website
Sounds as if you need the Redirect 403 to User Login module:
Redirect the HTTP 403 error page to the Drupal /user/login page with an optional message that reads:
"Access denied! You must login to vie …
1
vote
Accepted
How can I modify a user's last access date using Rules?
db_update('users')
->fields(array('access' => $timestamp))
->condition('uid', $account->uid)
->execute();
}
Use hook_cron() implementation in a custom module. … db_update('users')
->fields(array('access' => $timestamp))
->condition('uid', $account_to_update)
->execute();
}
}
} …
1
vote
Profile2 view with all profile fields
I think it would work if you create a view that displays users as rendered entities, not fields.
You can then tweak the way user entities are rendered and show all fields. …
0
votes
Delete useraccount with rules based on value filled during creation of account
You are not only limited to users, but to any other entities you have on the site. …