function mobile_tools_user_roles in Mobile Tools 7.2
Same name in this branch
- 7.2 mobile_tools_roles/mobile_tools_roles.module \mobile_tools_user_roles()
- 7.2 mobile_tools_roles/mobile_tools_roles.inc \mobile_tools_user_roles()
Same name and namespace in other branches
- 5 mobile_tools.module \mobile_tools_user_roles()
- 6 mobile_tools_roles.inc \mobile_tools_user_roles()
Helper function to return the desktop user roles
File
- mobile_tools_roles/
mobile_tools_roles.inc, line 121 - Contains the functionality to add mobile user roles
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;
}