Get User list and the Roles programmatically

Please have a look at this thread on the same subject (as far as I understand your question).