function hybridauth_form_user_profile_form_alter in HybridAuth Social Login 7.2
Same name and namespace in other branches
- 6.2 hybridauth.module \hybridauth_form_user_profile_form_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
hybridauth.module, line 253 - Main file for the HybridAuth module.
Code
function hybridauth_form_user_profile_form_alter(&$form, &$form_state, $form_id) {
if ($form['#user_category'] == 'account' && !empty($form['#user']->data['hybridauth'])) {
if ($form['account']['name']['#access'] && variable_get('hybridauth_disable_username_change', 1)) {
$form['account']['name']['#access'] = FALSE;
}
if (variable_get('hybridauth_remove_password_fields', 1)) {
$form['#validate'] = array_filter($form['#validate'], 'hybridauth_user_profile_form_validate_filter');
unset($form['account']['pass']);
unset($form['account']['current_pass']);
unset($form['account']['current_pass_required_values']);
}
}
}