Commit ac34798a authored by Dries's avatar Dries
Browse files

- Patch #923850 by mr.baileys, joachim: fixed documentation problem with...

- Patch #923850 by mr.baileys, joachim: fixed documentation problem with user_role_change_permissions().
parent 1fbb06ab
...@@ -2832,19 +2832,23 @@ function user_permission_get_modules() { ...@@ -2832,19 +2832,23 @@ function user_permission_get_modules() {
* *
* This function may be used to grant and revoke multiple permissions at once. * 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 * 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 * role, the form submit handler may directly pass the submitted values for the
* handler. * checkboxes form element to this function.
* *
* @param $rid * @param $rid
* The ID of a user role to alter. * The ID of a user role to alter.
* @param $permissions * @param $permissions
* An array of permissions, where the key holds the permission name and the * An associative array, where the key holds the permission name and the value
* value is an integer or boolean that determines whether to grant or revoke * determines whether to grant or revoke that permission. Any value that
* the permission: * evaluates to TRUE will cause the permission to be granted. Any value that
* evaluates to FALSE will cause the permission to be revoked.
* @code * @code
* array( * array(
* 'administer nodes' => 0, * 'administer nodes' => 0, // Revoke 'administer nodes'
* 'access user profiles' => 1, * '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 * @endcode
* Existing permissions are not changed, unless specified in $permissions. * Existing permissions are not changed, unless specified in $permissions.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment