yamcsha

Drupal 7 - Query for existing user entry

Jul 13th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2.     // instantiate the query using our extended query object
  3.     $query = new EntityFieldQuery();
  4.  
  5.     // let our query know which node types we want
  6.     $query->entityCondition('bundle', array('user'))
  7.           ->entityCondition('entity_type', array('user'))
  8.           ->fieldCondition('field__ser_name', 'value', $value);
  9.  
  10.     // execute the query
  11.     $result = $query->execute();
Advertisement
Add Comment
Please, Sign In to add comment