You are here

function og_get_user_roles_name in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og.module \og_get_user_roles_name()

Get the role names of role IDs.

Parameters

$rids: Array with role IDs.

Return value

Array keyed by the role ID, and the role name as the value.

1 call to og_get_user_roles_name()
og_handler_field_user_roles::pre_render in includes/views/og_handler_field_user_roles.inc
Run before any fields are rendered.

File

./og.module, line 2678
Enable users to create and manage groups with roles and permissions.

Code

function og_get_user_roles_name($rids = array()) {
  return db_query("SELECT rid, name FROM {og_role} WHERE rid IN (:rids)", array(
    ':rids' => $rids,
  ))
    ->fetchAllKeyed();
}