Get a list of all users and into an array I was wondering what how to get all the user and put all their UIDs into an array? I have seen similar questions but none really answer my question.
In Drupal 7 you can fetch all the users using entity_load like following,

$users = entity_load('user');


and array_keys($users) will gives you the array of uid's