summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-10-20 00:42:42 +0000
committerDries Buytaert <dries@buytaert.net>2010-10-20 00:42:42 +0000
commitac34798a0003313b68fae510204e05cc0abea344 (patch)
tree966a9ee96ca2c83b3be60946b9c03df83a15ca8f /modules
parent1fbb06abee7dc7797f5ab3c70faa35ff9a6939a1 (diff)
downloadbrdo-ac34798a0003313b68fae510204e05cc0abea344.tar.gz
brdo-ac34798a0003313b68fae510204e05cc0abea344.tar.bz2
- Patch #923850 by mr.baileys, joachim: fixed documentation problem with user_role_change_permissions().
Diffstat (limited to 'modules')
-rw-r--r--modules/user/user.module18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 3287c9e26..277c5fc5a 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -2832,19 +2832,23 @@ function user_permission_get_modules() {
*
* This function may be used to grant and revoke multiple permissions at once.
* For example, when a form exposes checkboxes to configure permissions for a
- * role, the submitted values may be directly passed on in a form submit
- * handler.
+ * role, the form submit handler may directly pass the submitted values for the
+ * checkboxes form element to this function.
*
* @param $rid
* The ID of a user role to alter.
* @param $permissions
- * An array of permissions, where the key holds the permission name and the
- * value is an integer or boolean that determines whether to grant or revoke
- * the permission:
+ * An associative array, where the key holds the permission name and the value
+ * determines whether to grant or revoke that permission. Any value that
+ * evaluates to TRUE will cause the permission to be granted. Any value that
+ * evaluates to FALSE will cause the permission to be revoked.
* @code
* array(
- * 'administer nodes' => 0,
- * 'access user profiles' => 1,
+ * 'administer nodes' => 0, // Revoke 'administer nodes'
+ * 'administer blocks' => FALSE, // Revoke 'administer blocks'
+ * 'access user profiles' => 1, // Grant 'access user profiles'
+ * 'access content' => TRUE, // Grant 'access content'
+ * 'access comments' => 'access comments', // Grant 'access comments'
* )
* @endcode
* Existing permissions are not changed, unless specified in $permissions.