function mobile_tools_roles_mobile_user_roles in Mobile Tools 6.3
Same name and namespace in other branches
- 6.2 modules/mobile_tools_roles/mobile_tools_roles.module \mobile_tools_roles_mobile_user_roles()
Helper function to return the mobile user roles
1 call to mobile_tools_roles_mobile_user_roles()
- mobile_tools_roles_form_alter in ./
mobile_tools_roles.module - Alteration to global setting form
File
- ./
mobile_tools_roles.module, line 93 - Contains the functionality to add mobile user roles
Code
function mobile_tools_roles_mobile_user_roles() {
$query = "SELECT m.mrid, r.name FROM {mobile_tools_roles_relations} m LEFT JOIN {role} r ON m.mrid = r.rid";
$result = db_query($query);
while ($mobile_role = db_fetch_object($result)) {
$mobile_roles[] = $mobile_role;
}
return $mobile_roles;
}