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.
5
votes
4
answers
9k
views
Using user_access() on Custom Node Type
In 'admin/people/permissions' I have an item named "Custom Type: Create new content" and it is enabled for authenticated users. …
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 …
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 …
0
votes
Page not found with new content
The admin account doesn't show cached content by default but the anonymous users do. …
27
votes
How can I find out a list of available $string values for user_access($string) function?
As @Berdir said, the easiest way to see which permissions are available is to go to the permissions admin/people/permissions in Drupal 7.
The problem I kept running into is that I could never figure …
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 …
13
votes
Accepted
Accessing Additional User Profile Fields
I think I found it. There is one additional step it seems.
global $user;
$user_full = user_load($user->uid); // user_load(uid) returns the complete array
var_dump($user_full);
I now have access to …
1
vote
2
answers
323
views
Earliest hook to generate content during user registration
During the user registration process in Drupal 7, at which point can I access the newly created UID to create 'default content' for that user? I would like to do this as early on as possible. Prefer …
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 …
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 …
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 …
9
votes
5
answers
10k
views
Accessing Additional User Profile Fields
I added a dozen or so new fields (in Drupal 7) to the user profiles using:
Configuration -> People -> Account Settings -> Manage Fields
(admin/config/people/accounts/fields)
How can I access these v …
2
votes
2
answers
1k
views
How to Collapse "Locale settings" (TimeZone) in User Profile with hook_form_FORM_ID_alter();
I cannot seem to get "Locale settings" fieldset to collapse using hook_form_FORM_ID_alter().
Here is what I've tried so far.
function fsrsys_form_user_profile_form_alter(&$form, &$form_state, $for …
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 …
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 …