Give the gift of Drupal. All merchandise is 50% off through 2016.
Role Weights provides some utility functions for accessing user role weights for other modules requiring this functionality (such as Path Access) as well as some additional Tokens for user role weights.
Once installed, modules can make use of:
- gets the weight value for a specified role
function role_weights_get_weighted_max($roles, $weight_end)
- takes an array of role_id => role_name and returns the 'lightest' (ie closest to -infinity) role id when $weight_end parameter is 'lightest' or the 'heaviest' (ie closest to +infinity) role id when $weight_end is 'heaviest'
The following tokens are also made available:
- [user:heaviest-role-class] - user's heaviest role class name (for use in CSS)
- [user:heaviest-role-id] - user's heaviest role id
- [user:heaviest-role] - user's heaviest role name
- [user:lightest-role-class] - user's lightest role class name (for use in CSS)
- [user:lightest-role-id] - user's lightest role id
- [user:lightest-role] - user's lightest role name
Check the README.txt file for some more information.
- Maintenance status: Minimally maintained
- Development status: Maintenance fixes only
- Module categories: Administration, User Management
- Reported installs: 158 sites currently report using this module. View usage statistics.
- Downloads: 7,059
- Automated tests: Enabled
- Last modified: October 10, 2016
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.