*** user.pages.inc.orig 2011-08-03 11:09:19.000000000 -0400 --- user.pages.inc 2011-08-03 11:24:53.000000000 -0400 *************** function user_pass_reset($form, &$form_s *** 135,140 **** --- 135,150 ---- // Let the user's password be changed without the current password check. $token = drupal_hash_base64(drupal_random_bytes(55)); $_SESSION['pass_reset_' . $user->uid] = $token; + //clear out flood event for user trying to log in too many times + if (variable_get('user_failed_login_identifier_uid_only', FALSE)) { + $identifier = $account->uid; + } + else { + $identifier = $account->uid . '-' . ip_address(); + } + drupal_set_message('
'.print_r($identifier, true).'
'); + flood_clear_event('failed_login_attempt_user', $identifier); + drupal_goto('user/' . $user->uid . '/edit', array('query' => array('pass-reset-token' => $token))); } else {