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.
0
votes
Accepted
How to mandate the password policy in custom form fields?
You can use the 'password_confirm" #type in your form to get the exact field Drupal uses.
Add this to your Form function.
$form['account']['pass'] = array(
'#type' => 'password_confirm',
…
0
votes
Send an email when the roles are changed
To detect 'any' change to the users roles, you can use the following PHP via the condition "Use PHP code"
return (count(array_diff_key($account->roles, $account_unchanged->roles)) + count(array_diff_key …
0
votes
Page not found with new content
The admin account doesn't show cached content by default but the anonymous users do. …
3
votes
Accepted
How to change the user profile edit page?
You can add new fields to the users profile page at admin/config/people/accounts/fields
You can also manipulate the form by implementing hook_form_user_profile_form_alter(&$form, &$form_state, $form_id …
1
vote
Get non-standard user attributes in layout
First, to access the additional user fields you will need to load the full user object using an available user id with the user_load() function.
global $user; //This contains the basic information …
1
vote
Accepted
How do you create a block of fields to a second Profile2 using views?
Using Configuration
You can use the Views module to access the Profile2 fields.
Below is a quote from ltiong on Drupal.org regarding accessing fields from multiple profile types. The same process a …
3
votes
Create new content type with a user reference
Your user selection/search process may need some custom work to implement the various node-reference modules in the way you've described, but there are several modules that may do what you need out of …
7
votes
Accepted
Render Profile2 field out of Profile2 page
Retrieve Profile2 Profile Data Programmatically
Implement profile2_by_uid_load() to get the data.
$profile2_data = profile2_by_uid_load($user->uid, 'profile_id');
$profile2_data will be an object …
1
vote
Accepted
Is it possible for an administrator to delete pending user relationship requests (between us...
Views Bulk Operations will run each selected item through the Rules component you created allowing an Administrator to delete pending user relationship requests between users. … Exported View - Retrieves Both Requester and Requestee UID's
$view = new view();
$view->name = 'user_relationships_browser';
$view->description = 'Shows someone\'s related users';
$view->tag = '';
$view …
2
votes
Accepted
How would you incorporate a log out confirmation screen?
Use jQuery
Pop-up
(function ($, Drupal, window, document, undefined) {
$(document).ready(function(){
$('a[href="/user/logout"]').click(function(e){
if(!confirm("Are you sure …
7
votes
Accepted
List all revison users on a node
Use The Views Module To Create A Custom Block
If you're using the Views module you can create a view that will show you what you need.
Create a new view (admin/structure/views/add) and choose 'Conte …
0
votes
How does Drupal 7 determine the output of user menu?
If you're adding new items to the user menu with hook_menu_alter() you may need to clear your menu cache before you see your changes.
You can clear you cache at:
"Administer > Site Configuration …
0
votes
User-Profile-Form.tpl.php not working. Help!
I'm struggling with what you're asking in the first portion of your question, but looking into the previous Stack Exchange page you referenced you can use the Panels module to quickly accomplish two c …
1
vote
Accepted
How to programmatically disallow some users to comment on some nodes?
Implement hook_menu_alter() and use your custom access function to control access to the comment system.
// Minimalist Example
function MYMODULENAME_menu_alter($items) {
$items['<path known to hook …
1
vote
How to programmatically disallow some users to comment on some nodes?
If you're looking to automate the closing of comments based on potentially complex logic the Rules module may be exactly what you're looking for. Managing the comments status of a given node is built …