diff --git a/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php b/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php
index 7800054..7c6ece4 100644
--- a/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php
+++ b/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php
@@ -27,6 +27,20 @@ class UserPasswordForm extends FormBase {
   protected $userStorageController;
 
   /**
+   * The flood service.
+   *
+   * @var \Drupal\Core\Flood\FloodInterface
+   */
+  protected $flood;
+
+  /**
+   * The config factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactory
+   */
+  protected $configFactory;
+
+  /**
    * The language manager.
    *
    * @var \Drupal\Core\Language\LanguageManager
@@ -40,10 +54,16 @@ class UserPasswordForm extends FormBase {
    *   The user storage controller.
    * @param \Drupal\Core\Language\LanguageManager $language_manager
    *   The language manager.
+   * @param \Drupal\Core\Config\ConfigFactory $config_factory
+   *   The config factory.
+   * @param \Drupal\Core\Flood\FloodInterface $flood
+   *   The flood service.
    */
-  public function __construct(UserStorageControllerInterface $user_storage_controller, LanguageManager $language_manager) {
+  public function __construct(UserStorageControllerInterface $user_storage_controller, LanguageManager $language_manager, ConfigFactory $config_factory, FloodInterface $flood) {
     $this->userStorageController = $user_storage_controller;
     $this->languageManager = $language_manager;
+    $this->configFactory = $config_factory;
+    $this->flood = $flood;
   }
 
   /**
@@ -53,6 +73,8 @@ public static function create(ContainerInterface $container) {
     return new static(
       $container->get('entity.manager')->getStorageController('user'),
       $container->get('language_manager'),
+      $container->get('config.factory'),
+      $container->get('flood')
     );
   }
 
@@ -107,19 +129,36 @@ public function buildForm(array $form, array &$form_state) {
    * {@inheritdoc}
    */
   public function validateForm(array &$form, array &$form_state) {
-    $name = trim($form_state['values']['name']);
-    // Try to load by email.
-    $users = $this->userStorageController->loadByProperties(array('mail' => $name, 'status' => '1'));
-    if (empty($users)) {
-      // No success, try to load by name.
-      $users = $this->userStorageController->loadByProperties(array('name' => $name, 'status' => '1'));
+    $flood_config = $this->configFactory->get('user.flood');
+    if ($this->flood->isAllowed('user.password_request', $flood_config->get('ip_limit'), $flood_config->get('ip_window'))) {
+      $this->flood->register('user.password_request', $flood_config->get('ip_window'));
+      $name = trim($form_state['values']['name']);
+      // Try to load by email.
+      $users = $this->userStorageController->loadByProperties(array('mail' => $name, 'status' => '1'));
+      if (empty($users)) {
+        // No success, try to load by name.
+        $users = $this->userStorageController->loadByProperties(array('name' => $name, 'status' => '1'));
+      }
+      $account = reset($users);
+      if ($account && $account->id()) {
+        form_set_value(array('#parents' => array('account')), $account, $form_state);
+      }
+      else {
+        form_set_error('name', t('Sorry, %name is not recognized as a username or an e-mail address.', array('%name' => $name)));
+      }
     }
+<<<<<<< HEAD
     $account = reset($users);
     if ($account && $account->id()) {
       form_set_value(array('#parents' => array('account')), $account, $form_state);
     }
     else {
       form_set_error('name', $this->t('Sorry, %name is not recognized as a username or an e-mail address.', array('%name' => $name)));
+=======
+    else
+    {
+      form_set_error('name', 'Reset password limit exceeded.  Please contact technical support for further assistance.');
+>>>>>>> Applying patch from https://drupal.org/node/1681832#comment-7766781
     }
   }
 
