function rules_condition_entity_field_access

Condition: User has access to field.

Related topics

1 string reference to 'rules_condition_entity_field_access'
rules_entity_condition_info in modules/entity.rules.inc
Implements hook_rules_condition_info() on behalf of the entity module.

File

modules/entity.eval.inc, line 187

Code

function rules_condition_entity_field_access(EntityDrupalWrapper $wrapper, $field_name, $op, $account = NULL) {
    $field = field_info_field($field_name);
    return !empty($field) && field_access($op, $field, $wrapper->type(), $wrapper->value(), $account = NULL);
}