function fp_get_permissions_for_role

7.x db.inc fp_get_permissions_for_role($rid)
6.x db.inc fp_get_permissions_for_role($rid)
4.x db.inc fp_get_permissions_for_role($rid)
5.x db.inc fp_get_permissions_for_role($rid)
1 call to fp_get_permissions_for_role()
fp_load_user in includes/db.inc
Returns back a user object for this user_id. If the user is not found in the users table, it will return NULL. If the user_id requested is 0, the anonymous user object is returned.

File

includes/db.inc, line 187
This file contains mostly db shortcuts.

Code

function fp_get_permissions_for_role($rid) {
  $rtn = array();
  $res = db_query("SELECT * FROM role_permissions
                   WHERE rid = '?' ", $rid);
  while ($cur = db_fetch_array($res)) {
    $rtn [$cur ["pid"]] = $cur ["perm"];
  }
  return $rtn;
}