function field_access


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 field.module field_access($op, $field, $entity_type, $entity = NULL, $account = NULL)
cle7 field.module field_access($op, $field, $entity_type, $entity = NULL, $account = NULL)
elmsmedia7 field.module field_access($op, $field, $entity_type, $entity = NULL, $account = NULL)
icor7 field.module field_access($op, $field, $entity_type, $entity = NULL, $account = NULL)
meedjum_blog7 field.module field_access($op, $field, $entity_type, $entity = NULL, $account = NULL)
mooc7 field.module field_access($op, $field, $entity_type, $entity = NULL, $account = NULL)

Determine whether the user has access to a given field.


$op: The operation to be performed. Possible values:

  • 'edit'
  • 'view'

$field: The full field structure array for the field on which the operation is to be performed. See field_info_field().

$entity_type: The type of $entity; e.g., 'node' or 'user'.

$entity: (optional) The entity for the operation.

$account: (optional) The account to check, if not given use currently logged in user.

Return value

TRUE if the operation is allowed; FALSE if the operation is denied.

Related topics

16 calls to field_access()
diff_entity_fields_diff in sites/all/modules/ulmus/diff/
Internal callback to handle fieldable entities.
email_mail_page_access in sites/all/modules/ulmus/email/email.module
Access callback for the email contact page.
entityreference_autocomplete_access_callback in sites/all/modules/ulmus/entityreference/entityreference.module
Menu Access callback for the autocomplete widget.
entity_metadata_field_access_callback in sites/all/modules/ulmus/entity/modules/
Callback to determine access for properties which are fields.
entity_views_handler_field_field::access in sites/all/modules/ulmus/entity/views/handlers/
Return TRUE if the user has access to view this field.

... See full list


modules/field/field.module, line 982
Attach custom data fields to Drupal entities.


function field_access($op, $field, $entity_type, $entity = NULL, $account = NULL) {
  global $user;

  if (!isset($account)) {
    $account = $user;

  foreach (module_implements('field_access') as $module) {
    $function = $module . '_field_access';
    $access = $function($op, $field, $entity_type, $entity, $account);
    if ($access === FALSE) {
      return FALSE;
  return TRUE;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.