How can I find user role based on user id? There are many user list.
My need is to find out user role based on their user id.
Use user_load() or global $user.

global $user;
$account = $user;
$role = $account-&gt;roles;// returns user role.


or

$user = user_load(uid);
$role = $user-&gt;roles;//return user role