diff --git a/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php b/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php
index 6bf60bc..59f4a6f 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserEditTest.php
@@ -42,6 +42,19 @@ class UserEditTest extends WebTestBase {
     $this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
     $this->assertRaw(t('The name %name is already taken.', array('%name' => $edit['name'])));
 
+    // Test that error message appears when attempting to use a non-unique
+    // e-mail address.
+    $edit = array();
+    $edit['mail'] = $user2->mail;
+    $edit['current_pass'] = $user1->pass_raw;
+    $this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
+    $this->assertRaw(t('The e-mail address %email is already taken.', array('%email' => $edit['mail'])));
+
+    // Allow multiple accounts to use the same e-mail address.
+    variable_set('user_mail_unique', FALSE);
+    $this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
+    $this->assertRaw(t('The changes have been saved.'));
+
     // Check that filling out a single password field does not validate.
     $edit = array();
     $edit['pass[pass1]'] = '';
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
index 56ad9a0..a672aea 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php
@@ -125,6 +125,8 @@ class UserRegistrationTest extends WebTestBase {
     $edit = array();
     $edit['name'] = $this->randomName();
     $edit['mail'] = $duplicate_user->mail;
+    $edit['pass[pass1]'] = $new_pass = $this->randomName();
+    $edit['pass[pass2]'] = $new_pass;
 
     // Attempt to create a new account using an existing e-mail address.
     $this->drupalPost('user/register', $edit, t('Create new account'));
@@ -135,6 +137,15 @@ class UserRegistrationTest extends WebTestBase {
 
     $this->drupalPost('user/register', $edit, t('Create new account'));
     $this->assertText(t('The e-mail address @email is already registered.', array('@email' => $duplicate_user->mail)), t('Supplying a duplicate email address with added whitespace displays an error message'));
+
+    // Allow multiple accounts to use the same e-mail address.
+    variable_set('user_mail_unique', FALSE);
+
+    // Create new user with original e-mail addresss.
+    $edit['mail'] = $duplicate_user->mail;
+
+    $this->drupalPost('user/register', $edit, t('Create new account'));
+    $this->assertText(t('Registration successful. You are now logged in.'), t('Users are logged in after registering.'));
   }
 
   function testRegistrationDefaultValues() {
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 01934b4..f1506d5 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -992,7 +992,7 @@ function user_account_form_validate($form, &$form_state) {
 
   $mail = $form_state['values']['mail'];
 
-  if (!empty($mail)) {
+  if (!empty($mail) && variable_get('user_mail_unique', TRUE)) {
     $mail_taken = (bool) db_select('users')
       ->fields('users', array('uid'))
       ->condition('uid', (int) $account->uid, '<>')
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index fcda92e..23c883b 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -58,15 +58,13 @@ function user_pass() {
 function user_pass_validate($form, &$form_state) {
   $name = trim($form_state['values']['name']);
   // Try to load by email.
-  $users = user_load_multiple(array(), array('mail' => $name, 'status' => '1'));
-  $account = reset($users);
-  if (!$account) {
+  $accounts = user_load_multiple(array(), array('mail' => $name, 'status' => '1'));
+  if (!$accounts) {
     // No success, try to load by name.
-    $users = user_load_multiple(array(), array('name' => $name, 'status' => '1'));
-    $account = reset($users);
+    $accounts = user_load_multiple(array(), array('name' => $name, 'status' => '1'));
   }
-  if (isset($account->uid)) {
-    form_set_value(array('#parents' => array('account')), $account, $form_state);
+  if ($accounts) {
+    form_set_value(array('#parents' => array('accounts')), $accounts, $form_state);
   }
   else {
     form_set_error('name', t('Sorry, %name is not recognized as a username or an e-mail address.', array('%name' => $name)));
@@ -76,11 +74,17 @@ function user_pass_validate($form, &$form_state) {
 function user_pass_submit($form, &$form_state) {
   global $language_interface;
 
-  $account = $form_state['values']['account'];
-  // Mail one time login URL and instructions using current language.
-  $mail = _user_mail_notify('password_reset', $account, $language_interface);
-  if (!empty($mail)) {
-    watchdog('user', 'Password reset instructions mailed to %name at %email.', array('%name' => $account->name, '%email' => $account->mail));
+  $accounts = $form_state['values']['accounts'];
+  $any_mail = FALSE;
+  foreach ($accounts as $account) {
+    // Mail one time login URL and instructions using current language.
+    $mail = _user_mail_notify('password_reset', $account, $language_interface);
+    if (!empty($mail)) {
+      $any_mail = TRUE;
+      watchdog('user', 'Password reset instructions mailed to %name at %email.', array('%name' => $account->name, '%email' => $account->mail));
+    }
+  }
+  if ($any_mail) {
     drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
   }
 
