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.
Usage
Once installed, modules can make use of:
function role_weights_get_weight($role_id)
- 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.
Supporting organisations
Thanks to FilmContact.com for supporting the update to Drupal 6.x and to Ixis for continued support.
Project information
- Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projects - No further development
No longer developed by its maintainers. - Module categories: Administration Tools, Access Control
- 49 sites report using this module
- Created by pfaocle on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 7.x-1.x-dev updated 30 Sep 2016 at 15:33 UTC