function shib_auth_profile_form_user_profile_form_alter in Shibboleth Authentication 7.4
Implements hook_FORM_ID_alter().
File
- shib_auth_profile/
shib_auth_profile.module, line 133 - Drupal Shibboleth authentication profile module.
Code
function shib_auth_profile_form_user_profile_form_alter(&$form, &$form_state) {
foreach (field_read_fields(array(
'entity_type' => 'user',
)) as $field_name => $field) {
foreach (field_read_instances(array(
'field_id' => $field['id'],
)) as $instance) {
$mode = (string) @$instance['settings']['shib_auth_profile']['mode'];
if ($mode == 'auto_update') {
$form[$field['field_name']]['#disabled'] = TRUE;
}
}
}
}