You are here

function pcp_form_user_admin_settings_alter in Profile Complete Percent 7

Same name and namespace in other branches
  1. 6.2 pcp.module \pcp_form_user_admin_settings_alter()

Implements hook_form_FORM_ID_alter().

File

./pcp.module, line 475
Allows users with valid permissions to tag profile fields (core fields or Profile2 fields) for a users profile to be considered complete.

Code

function pcp_form_user_admin_settings_alter(&$form, &$form_state) {
  form_load_include($form_state, 'inc', 'pcp', 'includes/pcp.admin');
  if (user_access('administer pcp')) {
    $form['personalization']['pictures']['pcp_enable_user_picture'] = array(
      '#title' => 'Make required for PCP module',
      '#type' => 'checkbox',
      '#default_value' => variable_get('pcp_enable_user_picture', 0),
      '#description' => t('Checking this box will tag this field as a required field for completion of the users profile.'),
      '#weight' => -5,
    );
    $form['#submit'][] = 'pcp_admin_settings_submit';
  }
}