diff --git a/core/modules/user/config/user.mail.yml b/core/modules/user/config/user.mail.yml
index edd78b9..63c906e 100644
--- a/core/modules/user/config/user.mail.yml
+++ b/core/modules/user/config/user.mail.yml
@@ -10,6 +10,12 @@ register_admin_created:
 register_no_approval_required:
   body: "[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
   subject: 'Account details for [user:name] at [site:name]'
+register_password_set_activation:
+  body: "[user:name],\n\nYour account at [site:name] has been activated.\n\nYou will be able to log in to [site:login-url] in the future using:\n\nusername: [user:name]\npassword: your password.\n\n--  [site:name] team\n\nClick on this link to request a new password if you are unable to log in:\n[site:url]user/login"
+  subject: 'Account details for [user:name] at [site:name]'
+register_password_set:
+  body: "[user:name],\n\nThank you for registering at [site:name]. You may now log in and verify your account by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once. You will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
+  subject: 'Account details for [user:name] at [site:name]'
 register_pending_approval:
   body: "[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.\n\n\n--  [site:name] team"
   subject: 'Account details for [user:name] at [site:name] (pending admin approval)'
diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php
index b79e983..65d4f36 100644
--- a/core/modules/user/lib/Drupal/user/AccountFormController.php
+++ b/core/modules/user/lib/Drupal/user/AccountFormController.php
@@ -102,7 +102,9 @@ public function form(array $form, array &$form_state, EntityInterface $account)
         $form['#validate'][] = 'user_validate_current_pass';
       }
     }
-    elseif (!$config->get('verify_mail') || $admin) {
+    // Show the password fields on registration when verify_mail is false,
+    // or verify_mail & password_register are set or the user is an admin.
+    elseif (!$config->get('verify_mail') || $config->get('verify_mail') && $config->get('password_register') || $admin) {
       $form['account']['pass'] = array(
         '#type' => 'password_confirm',
         '#size' => 25,
@@ -118,6 +120,13 @@ public function form(array $form, array &$form_state, EntityInterface $account)
       $status = $register ? $config->get('register') == USER_REGISTER_VISITORS : $account->status;
     }
 
+    // If we are not an admin and we try to register and password_register
+    // is set, make sure the status is set to to disabled before we save
+    // the newly created account.
+    if (!$admin && $register && $config->get('password_register')) {
+      $status = 0;
+    }
+
     $form['account']['status'] = array(
       '#type' => 'radios',
       '#title' => t('Status'),
diff --git a/core/modules/user/lib/Drupal/user/RegisterFormController.php b/core/modules/user/lib/Drupal/user/RegisterFormController.php
index 86bb70d..5999cdb 100644
--- a/core/modules/user/lib/Drupal/user/RegisterFormController.php
+++ b/core/modules/user/lib/Drupal/user/RegisterFormController.php
@@ -72,9 +72,10 @@ protected function actions(array $form, array &$form_state) {
    * Overrides Drupal\Core\Entity\EntityFormController::submit().
    */
   public function submit(array $form, array &$form_state) {
+    $config = config('user.settings');
     $admin = $form_state['values']['administer_users'];
 
-    if (!config('user.settings')->get('verify_mail') || $admin) {
+    if (!$config->get('verify_mail') || $config->get('verify_mail') && $config->get('password_register') || $admin) {
       $pass = $form_state['values']['pass'];
     }
     else {
@@ -120,6 +121,14 @@ public function save(array $form, array &$form_state) {
     if ($admin && !$notify) {
       drupal_set_message(t('Created a new user account for <a href="@url">%name</a>. No e-mail has been sent.', array('@url' => url($uri['path'], $uri['options']), '%name' => $account->name)));
     }
+    // E-mail verification enabled, but users set a password during registration.
+    elseif (!$admin && config('user.settings')->get('register') == USER_REGISTER_VISITORS && config('user.settings')->get('password_register') && !$account->status) {
+    	// Notify the user.
+    	_user_mail_notify('register_password_set', $account);
+
+    	drupal_set_message(t('A welcome message with further instructions has been sent to your e-mail address.'));
+    	$form_state['redirect'] = '';
+    }
     // No e-mail verification required; log in user immediately.
     elseif (!$admin && !config('user.settings')->get('verify_mail') && $account->status) {
       _user_mail_notify('register_no_approval_required', $account);
diff --git a/core/modules/user/lib/Drupal/user/UserStorageController.php b/core/modules/user/lib/Drupal/user/UserStorageController.php
index 5f340e4..f1a65bc 100644
--- a/core/modules/user/lib/Drupal/user/UserStorageController.php
+++ b/core/modules/user/lib/Drupal/user/UserStorageController.php
@@ -198,10 +198,18 @@ protected function postSave(EntityInterface $entity, $update) {
         drupal_session_destroy_uid($entity->uid);
       }
 
-      // Send emails after we have the new user object.
-      if ($entity->status != $entity->original->status) {
-        // The user's status is changing; conditionally send notification email.
-        $op = $entity->status == 1 ? 'status_activated' : 'status_blocked';
+      if ($entity->status != $entity->original->status && empty($entity->user_pass_set_notify)) {
+        if (config('user.settings')->get('password_register') && $entity->status) {
+          // The user's status is changing; conditionally send notification email.
+          $op = $entity->status == 1 ? 'status_activated' : 'status_blocked';
+          if (!$entity->login && config('user.settings')->get('password_register')) {
+            $op = 'register_password_set';
+          }
+          _user_mail_notify($op, $entity);
+        }
+      }
+      else {
+        $op = 'register_password_set_activation';
         _user_mail_notify($op, $entity);
       }
     }
diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc
index f4363cf..6a910ba 100644
--- a/core/modules/user/user.admin.inc
+++ b/core/modules/user/user.admin.inc
@@ -335,9 +335,36 @@ function user_admin_settings($form, &$form_state) {
   );
   $form['registration_cancellation']['user_email_verification'] = array(
     '#type' => 'checkbox',
-    '#title' => t('Require e-mail verification when a visitor creates an account.'),
+    '#title' => t('Require e-mail verification when a visitor creates an account'),
+    '#description' => t('New users will be required to validate their e-mail address prior to logging into the site, and will be assigned a system-generated password. With this setting disabled, users will be logged in immediately after registeration is completed.'),
     '#default_value' => $config->get('verify_mail'),
-    '#description' => t('New users will be required to validate their e-mail address prior to logging into the site, and will be assigned a system-generated password. With this setting disabled, users will be logged in immediately upon registering, and may select their own passwords during registration.')
+    '#states' => array(
+      // Hide this setting if only administrators can create accounts.
+      'invisible' => array(
+        'input[name="user_register"]' => array('value' => USER_REGISTER_ADMINISTRATORS_ONLY),
+      ),
+    ),
+  );
+
+  $form['registration_cancellation']['user_password_register'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Require people to choose a password during registration'),
+    '#description' => t('Let people enter a password during registration. If <em>Require e-mail verification</em> is disabled, this setting is automatically enabled.'),
+    '#default_value' => $config->get('password_register'),
+    '#states' => array(
+      // Disable this option if email_verification is unchecked.
+      'disabled' => array(
+        'input[name="user_email_verification"]' => array('checked' => FALSE),
+      ),
+      // Enable this option if email_verification is checked.
+      'enabled' => array(
+        'input[name="user_email_verification"]' => array('checked' => TRUE),
+      ),
+      // Hide this setting if only administrators can create accounts.
+      'invisible' => array(
+        'input[name="user_register"]' => array('value' => USER_REGISTER_ADMINISTRATORS_ONLY),
+      ),
+    ),
   );
   module_load_include('inc', 'user', 'user.pages');
   $form['registration_cancellation']['user_cancel_method'] = array(
@@ -516,6 +543,48 @@ function user_admin_settings($form, &$form_state) {
     '#rows' => 15,
   );
 
+  $form['email_password_set_activation'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Welcome (password set at registration)'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('Edit the welcome e-mail messages sent to new members upon registering, when no administrator approval is required and password has already been set.') . ' ' . $email_token_help,
+    '#group' => 'email',
+  );
+  $form['email_password_set_activation']['user_mail_register_password_set_activation_subject'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Subject'),
+    '#default_value' => $mail_config->get('register_password_set_activation.subject'),
+    '#maxlength' => 180,
+  );
+  $form['email_password_set_activation']['user_mail_register_password_set_activation_body'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Body'),
+    '#default_value' => $mail_config->get('register_password_set_activation.body'),
+    '#rows' => 15,
+  );
+
+  $form['email_password_set'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Account activation (password set at registration)'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('Edit the activation e-mail messages sent to new members upon registering, when no administrator approval is required and password has already been set during registration.') . ' ' . $email_token_help,
+    '#group' => 'email',
+  );
+  $form['email_password_set']['user_mail_register_password_set_subject'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Subject'),
+    '#default_value' => $mail_config->get('register_password_set.subject'),
+    '#maxlength' => 180,
+  );
+  $form['email_password_set']['user_mail_register_password_set_body'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Body'),
+    '#default_value' => $mail_config->get('register_password_set.body'),
+    '#rows' => 15,
+  );
+
   $form['email_password_reset'] = array(
     '#type' => 'fieldset',
     '#title' => t('Password recovery'),
@@ -676,6 +745,7 @@ function user_admin_settings_submit($form, &$form_state) {
     ->set('admin_role', $form_state['values']['user_admin_role'])
     ->set('register', $form_state['values']['user_register'])
     ->set('verify_mail', $form_state['values']['user_email_verification'])
+    ->set('password_register', $form_state['values']['user_password_register'])
     ->set('signatures', $form_state['values']['user_signatures'])
     ->set('cancel_method', $form_state['values']['user_cancel_method'])
     ->set('notify.status_activated', $form_state['values']['user_mail_status_activated_notify'])
@@ -691,6 +761,10 @@ function user_admin_settings_submit($form, &$form_state) {
     ->set('register_admin_created.subject', $form_state['values']['user_mail_register_admin_created_subject'])
     ->set('register_no_approval_required.body', $form_state['values']['user_mail_register_no_approval_required_body'])
     ->set('register_no_approval_required.subject', $form_state['values']['user_mail_register_no_approval_required_subject'])
+    ->set('register_password_set_activation.body', $form_state['values']['user_mail_register_password_set_activation_body'])
+    ->set('register_password_set_activation.subject', $form_state['values']['user_mail_register_password_set_activation_subject'])
+    ->set('register_password_set.body', $form_state['values']['user_mail_register_password_set_body'])
+    ->set('register_password_set.subject', $form_state['values']['user_mail_register_password_set_subject'])
     ->set('register_pending_approval.body', $form_state['values']['user_mail_register_pending_approval_body'])
     ->set('register_pending_approval.subject', $form_state['values']['user_mail_register_pending_approval_subject'])
     ->set('status_activated.body', $form_state['values']['user_mail_status_activated_body'])
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 6911853..fb7426c 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -2764,6 +2764,8 @@ function user_preferred_langcode($account, $type = NULL, $default = NULL) {
  *     self-registers.
  *   - 'register_pending_approval': Welcome message, user pending admin
  *     approval.
+ *   - 'register_password_set': Welcome message, password set.
+ *   - 'register_password_set_activation': Activation message, password set.
  *   - 'password_reset': Password recovery request.
  *   - 'status_activated': Account activated.
  *   - 'status_blocked': Account blocked.
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index 20af863..5671511 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -159,6 +159,29 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a
         drupal_goto('user/password');
       }
     }
+    // The user is possibly using a one-time-login link with a password
+    // already set. Make sure the account is never used and blocked
+    // and password register is set.
+    elseif (config('user.settings')->get('password_register') && $timestamp <= $current && $account && $account->status == $account->login) {
+      if ($account->uid && $timestamp >= $account->login && $timestamp <= $current && $hashed_pass == user_pass_rehash($account->pass, $timestamp, $account->login)) {
+        watchdog('user', 'User %name used one-time login link at time %timestamp.', array('%name' => $account->name, '%timestamp' => $timestamp));
+
+        // Set the account's status to enabled. (activate the account)
+        $account->status = 1;
+        // Set a flag to prevent mail_notify running for 'status' update.
+        $account->user_pass_set_notify = 1;
+        // Save the account.
+        $account->save();
+        // Set the new user.
+        $user = $account;
+
+        // user_login_finalize() also updates the login timestamp of the
+        // user, which invalidates further use of the one-time login link.
+        user_login_finalize();
+        drupal_set_message(t('You have just used your one-time login link. Your account is now active.'));
+        drupal_goto('user');
+      }
+    }
     else {
       // Deny access, no more clues.
       // Everything will be in the watchdog's URL for the administrator to check.
