How to get users (entities) for a certain field value? I want to write a function that returns users which have entered a certain value to a custom user field. 

Lets say there is a custom birthday field for every user. What would be the best way to get all users with a certain birthday?

I could create a DB query that searches the field_data_field_birthday table and returns the entity_id(s) (which in this case would be the users id(s)) for which the field_birthday_value matches a given value and then load the user(s). 

This seems a little bit crude, are there generic functions for this use case available? In the entity API or the field API maybe?
Simple example for the use case I asked about:

$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'user')
  -&gt;fieldCondition('field_birthday', 'value', $birthday);

$result = $query-&gt;execute();
$users_ids = array_keys($result['user']);