You are here

function multiple_registration_is_field_accessible in Multiple Registration 7

Check is field accessible by user.

Parameters

array $instance: Field instance data array.

Return value

bool Return TRUE, if field accesible, FALSE - if is not accessible.

2 calls to multiple_registration_is_field_accessible()
multiple_registration_field_group_pre_render in ./multiple_registration.module
Implements hook_field_group_pre_render().
multiple_registration_field_widget_form_alter in ./multiple_registration.module
Implements hook_field_widget_form_alter().

File

./multiple_registration.module, line 544
Add ability to create several registration pages.

Code

function multiple_registration_is_field_accessible(array $instance) {

  // For registration form.
  if (!user_is_logged_in()) {
    return _multiple_registration_is_field_accessible_for_not_logged_in($instance);
  }
  else {
    return _multiple_registration_is_field_accessible_for_logged_in($instance);
  }
}