1 EntityReferenceSelectionHandlerGeneric.inc | public EntityReferenceSelectionHandlerGeneric_user::buildEntityFieldQuery($match = NULL, $match_operator = 'CONTAINS') |
Build an EntityFieldQuery to get referenceable entities.
Overrides EntityReferenceSelectionHandlerGeneric::buildEntityFieldQuery
File
- core/
modules/ entityreference/ plugins/ selection/ EntityReferenceSelectionHandlerGeneric.inc, line 396 - Generic Entity handler.
Class
- EntityReferenceSelectionHandlerGeneric_user
- Override for the User entity type.
Code
public function buildEntityFieldQuery($match = NULL, $match_operator = 'CONTAINS') {
$query = parent::buildEntityFieldQuery($match, $match_operator);
// Adding the 'user_access' tag is insufficient for users: need to
// also know about the concept of 'blocked' and 'active'.
if (!user_access('administer users')) {
$query->propertyCondition('status', 1);
}
return $query;
}