How to get the values ​of an array in the options list (hook_rules_condition_info ()) instead of array index?
You just need a reliable array key so you can load the data up again somewhere else; since you're going into the users table, uid seems appropriate:

function list_all_users() {
  return db_query('SELECT uid, name FROM {users}')-&gt;fetchAllKeyed();
}


That will turn the options into an array with user IDs as keys and names as values. As far as the front end is concerned, nothing changes.

Now when you receive the selected option value in the validation function, you can just load the user up and get the name from the entity:

$account = user_load($the_value);
$name = $account-&gt;name;