How to programmatically list users with a certain role?
In Drupal 7, user_load_multiple($uids = array(), $conditions = array(), $reset = FALSE) 
will load the user details for the given user IDs.
In Drupal 6, there isn't that function, but you can use $user = user_load(array('uid' =&gt; $node-&gt;uid));.