function ulogin_form_user_profile_form_alter in uLogin (advanced version) 7
Same name and namespace in other branches
- 6 ulogin.module \ulogin_form_user_profile_form_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
ulogin.module, line 184 - Main file for the uLogin module.
Code
function ulogin_form_user_profile_form_alter(&$form, &$form_state, $form_id) {
//global $user;
if ($form['#user_category'] == 'account' && !empty($form['#user']->data['ulogin'])) {
if ($form['account']['name']['#access'] && variable_get('ulogin_disable_username_change', 1)) {
$form['account']['name']['#access'] = FALSE;
}
if (variable_get('ulogin_remove_password_fields', 1)) {
$form['#validate'] = array_filter($form['#validate'], 'ulogin_user_profile_form_validate_filter');
unset($form['account']['pass']);
unset($form['account']['current_pass']);
unset($form['account']['current_pass_required_values']);
}
}
}