function _referral_get_user_roles in User Referral 7
Same name and namespace in other branches
- 5 referral.module \_referral_get_user_roles()
- 6 referral.module \_referral_get_user_roles()
3 calls to _referral_get_user_roles()
File
- ./
referral.module, line 812 - The referral module.
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 = :uid', array(
':uid' => $uid,
));
foreach ($result as $row) {
$data[] = $row->name;
}
return $data;
}