Adding an OR condition to an existing query
Adding new conditions to the query won't overwrite the existing ones, you need to reset the existing array of conditions, build up a new one and add it to the query:

// Get the query args and then the search term
$args = $query-&gt;getArguments();
$search = array_shift($args);

// Get a reference to the existing query conditions.
$conditions =&amp; $query-&gt;conditions();

// Reset the condition array. It needs a default #conjunction for which AND is fine
$conditions = array('#conjunction' =&gt; 'AND');

// Build up your condition
$condition = db_or()
  -&gt;condition('users.name', $search, 'LIKE')
  -&gt;condition('n.field_name_value', $search, 'LIKE');

// Add the new OR condition to the query
$query-&gt;condition($condition);

// Join the relevant table
$query-&gt;leftJoin('field_data_field_name', 'n', 'users.uid = n.entity_id');


I've just tested that to work on a local installation.

There is a slight caveat...for users with the 'administer users' permission the default is to also search through users' email addresses. You can cater for this by adding the following lines immediately before $query-&gt;condition($condition);:

if (user_access('administer users')) {
  $condition-&gt;condition('mail', $search, 'LIKE');
}


It might also be wise to test the bundle and entity_type columns in the joined field table in case you ever attach the same field to another entity. This way you won't get any false results:

$join = "users.uid = n.entity_id AND n.entity_type = 'user' AND n.bundle = 'user'";
$query-&gt;leftJoin('field_data_field_name', 'n', $join);


EDIT

As per Berdir's comment, to maintain as much compatibility as possible with other modules that might also alter this query, you probably want to loop through the conditions, find the one(s) that you need to change and do so on an individual basis. 

The above example is pretty rudimentary and works on a 'vanilla' Drupal install, hopefully it'll get you pointed in the right direction.