You are here

function menu_per_role_get_roles in Menu Per Role 5

2 calls to menu_per_role_get_roles()
menu_per_role_access in ./menu_per_role.module
menu_per_role_form_alter in ./menu_per_role.module

File

./menu_per_role.module, line 28
Allows restricting access to menu items per role

Code

function menu_per_role_get_roles($mid) {
  $result = db_query("SELECT rid FROM {menu_per_role} WHERE mid = %d", $mid);
  $rids = array();
  while ($row = db_fetch_object($result)) {
    $rids[] = $row->rid;
  }
  return $rids;
}