function fasttoggle_potential_toggleable_roles in Fasttoggle 7
Same name and namespace in other branches
- 6 fasttoggle.inc \fasttoggle_potential_toggleable_roles()
Get a list of roles that can be toggled.
Return value
array Toggleable roles.
2 calls to fasttoggle_potential_toggleable_roles()
- fasttoggle_sitewide_toggleable_roles in module/
fasttoggle_user/ fasttoggle_user.inc - Get a list of roles for the sitewide settings form.
- fasttoggle_user_fasttoggle_available_links in module/
fasttoggle_user/ fasttoggle_user.module - Implements hook_fasttoggle_available_links().
File
- module/
fasttoggle_user/ fasttoggle_user.inc, line 14 - Fasttoggle user hook implementations.
Code
function fasttoggle_potential_toggleable_roles() {
static $roles;
if (!isset($roles)) {
$roles = user_roles(TRUE);
unset($roles[DRUPAL_AUTHENTICATED_RID]);
}
return $roles;
}