You are here

function hybridauth_form_user_profile_form_alter in HybridAuth Social Login 6.2

Same name and namespace in other branches
  1. 7.2 hybridauth.module \hybridauth_form_user_profile_form_alter()

Implements hook_form_FORM_ID_alter().

File

./hybridauth.module, line 170
Main file for the HybridAuth module.

Code

function hybridauth_form_user_profile_form_alter(&$form, &$form_state) {
  if (!empty($form['_account']['#value']->hybridauth)) {
    if (variable_get('hybridauth_disable_username_change', 1)) {
      $form['account']['name']['#access'] = FALSE;
    }
    if (variable_get('hybridauth_remove_password_fields', 1)) {
      unset($form['account']['pass']);
    }
  }
}