function username_enumeration_prevention_form_user_pass_reset_alter in Username Enumeration Prevention 8
Implements hook_form_FORM_ID_alter().
Ensures usernames are not exposed when spoofing a reset password URL.
File
- ./
username_enumeration_prevention.module, line 37 - Main file for the Username Enumeration Prevention module.
Code
function username_enumeration_prevention_form_user_pass_reset_alter(&$form, FormStateInterface $form_state, $form_id) {
$form['message'] = [
'#markup' => t('<p>This is a one-time login.</p><p>Click on this button to log in to the site and change your password.</p>'),
];
}