function cas_form_user_pass_alter in CAS 8
Same name and namespace in other branches
- 2.x cas.module \cas_form_user_pass_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
cas.module, line 100 - Provides CAS authentication for Drupal.
Code
function cas_form_user_pass_alter(&$form, FormStateInterface $form_state) {
if (\Drupal::currentUser()
->isAnonymous() && \Drupal::config('cas.settings')
->get('user_accounts.restrict_password_management')) {
$form['#validate'][] = '_cas_validate_user_pass_form';
}
}