You are here

function mobile_tools_user_roles in Mobile Tools 5

Same name and namespace in other branches
  1. 6 mobile_tools_roles.inc \mobile_tools_user_roles()
  2. 7.2 mobile_tools_roles/mobile_tools_roles.module \mobile_tools_user_roles()
  3. 7.2 mobile_tools_roles/mobile_tools_roles.inc \mobile_tools_user_roles()

Helper function to return the user roles

1 call to mobile_tools_user_roles()
mobile_tools_form_alter in ./mobile_tools.module
Altering the form for theme configuration to indicate that the theme is being used as a mobile theme.

File

./mobile_tools.module, line 521
Mobile Tools provides a range of functionality assisting in creating a mobile drupal site . this functionality contains:

Code

function mobile_tools_user_roles() {

  //$roles = array('none');
  $roles = user_roles();
  $desktop_roles = array();
  foreach ($roles as $key => $value) {
    $role = mobile_tools_roles_info(array(
      'id' => $key,
    ));
    if ($role->type == 'desktop') {
      $desktop_roles[$key] = $value;
    }
  }
  return $desktop_roles;
}