You are here

function _referral_get_user_roles in User Referral 6

Same name and namespace in other branches
  1. 5 referral.module \_referral_get_user_roles()
  2. 7 referral.module \_referral_get_user_roles()
3 calls to _referral_get_user_roles()
referral_admin_view_details in ./referral.module
referral_admin_view_roles in ./referral.module
referral_view in ./referral.module

File

./referral.module, line 557

Code

function _referral_get_user_roles($uid) {
  $data = array();
  $result = db_query('SELECT r.name FROM {role} r INNER JOIN {users_roles} ur USING (rid)
    WHERE ur.uid = %d', $uid);
  while ($row = db_fetch_object($result)) {
    $data[] = $row->name;
  }
  return $data;
}