Problem/Motivation

When configuring password behaviour on the registration form, there is no way to force the rendering of the password fields on the registration form if e-mail confirmation is enabled.

An option to configure / force the password fields on the user registration form, while e-mail verification is enabled, might offer a way for site owners to alter the process and make it fit more to their case. (flexibility++)

There is a module that offers this behaviour in Drupal 7, called User Registration Password, the current concept patch started with code that's partially based on this module, but evolved a bit beyond this.

Proposed resolution

Develop a patch that offers minimal functionality. Patch exists, see #58.

Remaining tasks

User interface changes

  • Adds 1 checkbox on the 'admin/config/people/accounts' page.
  • The patch will add 2 extra e-mail templates for sending a welcome and activation e-mail.

API changes

  • Adds 1 new variable: 'password_register'.

Screenshots

Before:
password option before
After:
password option after

First screenshot:
First screenshot
Second screenshot:
Second screenshot

Possible checkbox combinations:

[X] Require e-mail verification when a visitor creates an account.
[_] Require people to choose a password during registration.
This is the first screenshot, people are not able to set a password during registration, because verification is enabled.

[X] Require e-mail verification when a visitor creates an account.
[X] Require people to choose a password during registration.
This is the second screenshot, people are required to set a password during registration, while verification is enabled.

[_] Require e-mail verification when a visitor creates an account.
[..] Require people to choose a password during registration.
No separate screenshot, but this is the same as the second screenshot, users need to set a password during registration and are directly authenticated after submit. [..] is the disabled checkbox (via #states).

Notes

This patch overrides the 'status' on the submit form for new users and set the status to '0' (disabled). This makes it possible to facilitate our new option and functionality with minimal changes to the existing code.

The current patch also implements a change in user_pass_reset() to facilitate re-sending password_register activation e-mails to users that never logged in yet. (and also didn't receive the first activation e-mail.) They can re-request it via the password reset page.

For Drupal 8 the current patch works, but while it does already improve the account options a bit, some wonder if we should implement this as-is, without implementing some new account status workflow first.

For Drupal 9 we might want to think about refactoring the workflow even more, really decouple the password option from the 'verify' code, and maybe even implement a workflow for accounts, but most people agree to continue with the current patch / idea and focus on more / bigger changes in D9.
(possible future issue: Decouple 'email verify' and 'password' options.)

Original report by finalternatives

Hi, I run a daily news site and have been getting a lot of complaints about people who say it is confusing to log in using the temporary password. Is it possible to have people choose their own password when signing up? Ideally they would then receive an email telling them to click on the link to verify the account. My guess is that people log in the first time and then are too lazy to change the password, and when they return to the site they can’t log in again.

Does anyone have any other ideas for streamlining the registration/login process to make it more user friendly?

CommentFileSizeAuthor
#209 drupal_core-115801-allow_password_without_disabling_email_verification-209.patch29.18 KBadinac
#208 115801-allow-password-without-disabling-email-verification-reroll-208.patch31.46 KBadinac
#207 115801-allow-password-without-disabling-email-verification-207-reroll-2.patch30.87 KBbiancaradu27
#206 115801-allow-password-without-disabling-email-verification-206-reroll.patch29.56 KBbiancaradu27
#205 115801-nr-bot.txt3.82 KBneeds-review-queue-bot
#197 115801-allow-password-without-disabling-email-verification-197.patch31.9 KBershov.andrey
#194 115801-allow-password-on-register-194.patch39.07 KBlinhnm
#185 115801-185.patch33.07 KBanchal_gupta
#184 interdiff-115801-183-184.txt2.92 KBvoleger
#184 115801-184.patch33.07 KBvoleger
#183 reroll_diff_179-183.txt9.33 KBravi.shankar
#183 115801-183.patch33.02 KBravi.shankar
#179 interdiff_178-179.txt3 KBpooja saraah
#179 115801-179.patch34.54 KBpooja saraah
#178 interdiff_176-178.txt3.1 KBpooja saraah
#178 115801-178.patch34.64 KBpooja saraah
#176 drupal-set_password-115801-176.patch34.55 KBmistrae
#175 interdiff_173-174.txt733 bytessuresh prabhu parkala
#175 115801-175.patch30.52 KBsuresh prabhu parkala
#173 drupal-set_password-115801-173.patch30.56 KBmistrae
#172 drupal-set_password-115801-172.patch30.6 KBmistrae
#165 drupal-set_password-115801-165.patch30.63 KBvladimiraus
#164 interdiff_162-164.txt1.03 KBvsujeetkumar
#164 115801-164.patch30.48 KBvsujeetkumar
#162 interdiff_158-162.txt2.49 KBvsujeetkumar
#162 115801-162.patch30.28 KBvsujeetkumar
#158 interdiff_157-158.txt873 bytesvsujeetkumar
#158 115801-158.patch30.49 KBvsujeetkumar
#157 115801-157.patch30.47 KBvsujeetkumar
#155 Patch 115801 Fail 152.png883.47 KBchetanbharambe
#154 #153.png56.11 KBheni_deepak
#154 #152.png102.53 KBheni_deepak
#153 allow_password_on_registration_115801-153.patch14.99 KBprabhat burnwal
#152 drupal-set_password-115801-152.patch31.25 KBvladimiraus
#151 diff_reroll_115801_148-151.txt26.25 KBankithashetty
#151 115801-151.patch31.22 KBankithashetty
#150 Screenshot from 2021-05-25 16-47-42.png92.8 KBvikashsoni
#150 Screenshot from 2021-05-25 16-47-08.png95.8 KBvikashsoni
#148 reroll_diff_144-148.txt10.73 KBxavier.masson
#148 115801-allow-password-on-register-148.patch36.52 KBxavier.masson
#147 reroll_diff_144-147.txt11.13 KBxavier.masson
#147 115801-allow-password-on-register-147.patch36.52 KBxavier.masson
#146 interdiff-143-144.txt6.74 KBbserem
#146 115801-allow-password-on-register-144.patch37.02 KBbserem
#143 drupal-set_password-115801-143-d9.2.patch41.98 KBvladimiraus
#141 interdiff_139_141.txt14.79 KBanmolgoyal74
#141 drupal-set_password-115801-141.patch42.26 KBanmolgoyal74
#139 interdiff_115801_135-139.txt19.86 KBvladimiraus
#139 drupal-set_password-115801-139.patch42.55 KBvladimiraus
#137 interdiff_115801_135-137.txt18.25 KBvladimiraus
#137 drupal-set_password-115801-137.patch40.94 KBvladimiraus
#135 interdiff_115801_131-135.txt25.3 KBvladimiraus
#135 drupal-set_password-115801-135.patch36.47 KBvladimiraus
#131 115801_131.patch18.38 KBanushrikumari
#129 interdiff_115801_127-128.txt1.59 KBankithashetty
#129 115801_128.patch18.38 KBankithashetty
#127 diff_reroll_115801_121-127.txt14.98 KBankithashetty
#127 115801_127.patch18.36 KBankithashetty
#121 drupal-8.6-115801-121-passwordregister.patch16.72 KBRob C
password-register-115801-118.patch16.22 KBvacho
#113 drupal-8.6.2-115801-111-passwordregister.patch14.31 KBgeek-merlin
#112 drupal-8.6-115801-111-passwordregister.patch17.05 KBgeek-merlin
#110 drupal-115801-110-passwordregister.patch17.07 KBgeek-merlin
#102 115801-102.patch16.65 KBblazey
#98 drupal_115801_user_registration_password_set_checkbox-98.patch16.58 KBspadxiii
#98 interdiff.txt4.57 KBspadxiii
#92 interdiff.txt994 byteseyilmaz
#92 drupal_115801_user_registration_password_set_checkbox-92.patch16.2 KBeyilmaz
#91 interdiff.txt994 byteseyilmaz
#91 drupal_115801_user_registration_password_set_checkbox-91.patch16.71 KBeyilmaz
#88 drupal_115801_user_registration_password_set_checkbox-88.patch16.78 KBbotanic_spark
#86 drupal_115801_user_registration_password_set_checkbox-86.patch16.78 KBbotanic_spark
#84 drupal_115801_user_registration_password_set_checkbox-84.patch350.43 KBbotanic_spark
#81 drupal_115801_user_registration_password_set_checkbox-81.patch15.34 KBbotanic_spark
#76 drupal_115801_user_registration_password_set_checkbox-76.patch20.08 KBRob C
#74 drupal_115801_user_registration_password_set_checkbox-74.patch20.12 KBRob C
#72 drupal_115801_user_registration_password_set_checkbox-71.patch20.12 KBRob C
#71 drupal_115801_user_registration_password_set_checkbox-71.patch20.12 KBRob C
#71 create-01.png22.03 KBRob C
#71 create-02.png29.43 KBRob C
#58 drupal_115801_user_registration_password_set_checkbox-58.patch17.44 KBRob C
#58 before.png75.61 KBRob C
#58 after.png72.48 KBRob C
#55 drupal_115801_user_registration_password_set_checkbox-55.patch11.87 KBshnark
#54 new_account_without_patch.png116 KBbannockree
#54 admin_adding_user_without_patch.png130.56 KBbannockree
#48 drupal_password_option_after.png45.63 KBRob C
#47 drupal_115801_user_registration_password_set_checkbox-47.patch17.39 KBRob C
#47 interdiff.txt2.91 KBRob C
#45 drupal_115801_user_registration_password_set_checkbox-45.patch18.79 KBRob C
#45 interdiff.txt2.71 KBRob C
#43 drupal_115801_user_registration_password_set_checkbox-43.patch17.78 KBRob C
#43 interdiff.txt3.89 KBRob C
#40 drupal_115801_user_registration_password_set_checkbox-40.patch17.46 KByesct
#40 interdiff-34-40.txt566 bytesyesct
#36 without_patch.png119.75 KBbannockree
#34 drupal_115801_user_registration_password_set_checkbox-34.patch17.46 KBbannockree
#29 drupal_115801_user_registration_password_set_checkbox-2.patch17.33 KBRob C
#26 drupal_115801_user_registration_password_set_checkbox-1.patch15.55 KBRob C
#22 user_registration_password_set_checkbox.patch20.31 KBRob C
#21 user_registration_password_set_radios.patch20.19 KBRob C
#20 user_register_password_set.patch22.79 KBRob C
#18 user_register_password_set.patch22.78 KBRob C

Issue fork drupal-115801

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cosmicdreams’s picture

Interesting...

Perhaps this is one of those instances where ease of use is at odds against security. I think the purpose for requiring a user to change their password from the throw away one is that we don't want to override an administer's ability to prevent new logins. Maybe I'm just clueless

Aren't users still able to request a new password and try the login experience again?

elv’s picture

Generated passwords avoid account creation by bots, I guess.
The other way around would be for people to set a password when they create the account, then the account would be activated only when they click a link in the mail. But AFAIK the only way right now is with a generated password.

travischristopher’s picture

Anonymous’s picture

Project: » Drupal core
Version: » 7.x-dev

The user experience project is closing so this issue is being moved to the usability component under the Drupal project

ainigma32’s picture

Status: Active » Fixed

As a possible solution was provided in #3 (i.e. use a contributed module) I'm setting this to fixed.

Feel free to reopen if you think that is wrong.

- Arie

damien tournoud’s picture

Category: support » task
Status: Fixed » Active

Promoted to an usability task. I think there is a considerable margin for improvement here.

damien tournoud’s picture

Title: Making It Easier To Log In » Revamp registration / request new password

@elv and the rest of the usability team: could you suggest a mock-up of how this could be improved?

Bojhan’s picture

Doesn'st seem like a mockup would be required, only a patch to let the user enter a password instead of not?

damien tournoud’s picture

@Bojhan: wouldn't it be better to think about the whole registration / login / request new password process?

Some questions:

- do we really need a "Request new password" link in the login block?
- do we need some explanation on the "Request new password form"?
- how to revamp the "Reset password" form? Currently this forms shows a lot of text including a frightful "This is a one-time login for and will expire on Fri, 12/12/2008 - 15:24." Could we have directly a new password box here, instead of redirecting the user to the "User account" form? etc.

Bojhan’s picture

Title: Revamp registration / request new password » Allow password on registration

To comment on all of this, I never got why we where breaking with convention of sending an e-mail with a password you have to reset. Lets keep this issue focused on that.

On to the other questions, we have to look at when something happends

- For the "Request new password" it is behavior we have to assume, since we have no data on it. When do people need a new password? Probally when they are failing to login, so it should be promted only then.

- Should be removed.

- Is there a security reason for this? I never understood why we needed to redirect instead of just allowing one to inmediadtly trowing in a new password.

Tor Arne Thune’s picture

Title: Allow password on registration » Allow password on registration without disabling e-mail verification
Version: 7.x-dev » 8.x-dev
Component: usability » user.module

In Drupal 7.0 there is an option to "Require e-mail verification when a visitor creates an account" at admin/config/people/accounts/settings.

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.

While disabling this option makes it possible for users to select their own passwords during registration, it also turns off e-mail verification. I can see a use case for having users selecting their own passwords on registration, but also require an e-mail verification.

Perhaps split this option into two options; one for requiring e-mail verification and one for enabling users to select their own passwords on registration.

EarthLaunch’s picture

This is an issue for me. LoginToboggan definitely doesn't solve it.

There's a module that enables the behavior (register with password, + authenticate email), currently only for D7, and I may backport it to 6.x:
http://drupal.org/project/user_registrationpassword

drupalreggie’s picture

+ 1

jherencia’s picture

jlp1’s picture

+1 : the functionality for registration with custom password + email verification is desired by many, evidenced on multiple threads, various implementations, and requested by my personal clients. I am always considering/exploring for more concise ways of handling these options, and am still surprised that more robust core functionality hasn't been accomplished much earlier. For D6 I am using LoginTobogan registration block that can be configured as outlined in this thread { http://drupal.org/node/582764 } although this is not ideal-> folks dealing with similar problem; It is possible to use roles, redirects, email verify re-sends, and custom messages prompting users to check their mail to verify their account (various tactics discussed on threads), yet this is fairly involved, jarring from a new user experience, and complicated for developers. The options for both allowing user-chosen password and required email verification should be independently available to the admin in the core, or meanwhile, any module handling both functions.

#12 @EarthLaunch -> I have been reviewing the LT module and D7 registrationPassword as well; did you proceed with backporting that for D6? I have been considering creating some new code for D6 as well. Let me know how I can help.

Moving forward with Drupal core- I hope this common functionality can be integrated. Thank you to everyone on this thread/similars and the entire Drupal community!

andypost’s picture

Reported installs: 210 sites currently report using this module

Looks like not very popular feature

Rob C’s picture

As the current (co-)maintainer of User Registration Password, some comments:

Would love to have this in core, and i guess more and more people have that idea, because the usage stats are only going up, but if that won't be the case, we will think about a port to D8. (still lots of time left before D8 is anywhere near a (stable) release.)

D6: @EarthLaunch to bad i only just found this issue, (also @jlp1) see http://drupal.org/node/1708180 for a D6 port i rolled)

Current reported installs URP: 1100 see http://drupal.org/project/usage/user_registrationpassword

Rob C’s picture

Category: task » feature
Status: Active » Needs review
StatusFileSize
new22.78 KB

User stats:
D6: 26 sites (yeah, i backported it)
D7: 1358 (first week it's going down a bit)

It's not super popular, true, but the word is getting out that it's stable and that it exists. I found 1 company listing it on a document (case study) and 2 sites next to d.o. with a question where this was listed as a suggestion, so yes, it's getting out slow, but steady going up. Also have to admit that since the 1.2 release the module is getting more and more stable, before that the module sufferd some issues that are now fixed, but that bumped the stats a bit at the start i guess.

I have started working on an initial patch for Drupal 8! It's still a draft stage, but applies clean and it just works. (still wonder about what the best way would be to handle a couple of issues), so give it a try. (it does still need a couple tweaks and tests.)

Status: Needs review » Needs work

The last submitted patch, user_register_password_set.patch, failed testing.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new22.79 KB

Dear testbot, your so right. Let's try that again.

Rob C’s picture

StatusFileSize
new20.19 KB

I created 2 patches, 1 rendering an extra checkbox and 1 transforming the existing checkbox on the 'config/people/accounts' page. You don't have to apply both, it's the same patch, only difference is how the config page works. (I believe the one with the extra checkbox works best / least confusing.)

This is the first version. This one transforms the 'Require e-mail verification when a visitor creates an account. ' checkbox into a radios with 1 extra option:
'Require a verification e-mail, but let users set their password directly on the registration form.'

Rob C’s picture

And this is the second one. This one renders a second checkbox on the 'config/people/accounts' page.
If checked, people have to set a password during registration, just like the 3rd option from the previous patch.

Rob C’s picture

Issue summary: View changes

Added a bit more info.

chx’s picture

Status: Needs review » Needs work

Thanks for the patch. One minor problem: it has TAB characters, please use two spaces. As the tag indicates, this would need a test. Finally, and this is the biggest problem I can see from a quick review, user_register_password_set seems to replicate a lot of code already in user_pass_reset.

chx’s picture

Issue tags: +Needs tests

Hrm, the tag didnt get added somehow.

Rob C’s picture

chx, yes i have seen that too. I already did a quick attempt to combine it, but i figured let's first upload it to get some response (like this)

Also the menu item that's used is almost the same, but i was not sure if i should change user_pass_reset() without first discussing it.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new15.55 KB

This is a reroll from #22 big rewrite that changes the user_pass_reset() function, addressing the 'bigger issue' chx pointed at in #23. All duplicate code is almost gone and i hope all tabs are also gone.

fabianx’s picture

+++ b/core/modules/user/lib/Drupal/user/AccountFormController.phpundefined
@@ -102,7 +102,9 @@ public function form(array $form, array &$form_state, EntityInterface $account)
+    // 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',

This logic seems a little strange. At least some () around && are missing.

+++ b/core/modules/user/lib/Drupal/user/AccountFormController.phpundefined
@@ -118,6 +120,13 @@ public function form(array $form, array &$form_state, EntityInterface $account)
+    // the newly created account.
+    if (!$admin && $register && $config->get('password_register')) {
+      $status = 0;
+    }

Why is this extra if necessary?

Can't the logic be done directly above?

Currently I find it more confusing than helping.

+++ b/core/modules/user/lib/Drupal/user/RegisterFormController.phpundefined
@@ -120,6 +121,14 @@ public function save(array $form, array &$form_state) {
+    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'] = '';

Tabs! ;-)

---

Overall I like the patch, but I believe it needs more work in terms of _simplifying_ the whole logic. It might help to spell out the logic once as "text" here and then we can simplify it.

Leaving for review of others ...

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-1.patch, failed testing.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new17.33 KB

Ok, let's try that again dear testbot.
- Added update function.
- Changed logic in multiple places.
- Moved and changed '$status = 0' to the submit function in RegisterFormController.php.
- Added a test implementation in user_pass_validate() to enable users to request the activation e-mail via the 'user/password' page. This only works if they never ever logged in before. This still needs work, same story: duplicating code. (WIP)
- Stripped some unwanted code, let's stick to the basics.

@Fabianx
1st & 3rd true.
2nd: '$status = 0' We need that to stop the account from being activated during registration. We need it to be activated during confirmation, not before.

Rob C’s picture

Issue summary: View changes

Minor update, added current patches + updated some info.

Rob C’s picture

Issue summary: View changes

Updated current info, added more details.

Rob C’s picture

Added this issue to #1837054: [META] Refactor account workflow (and config)
Will also try to write a test in the next couple days for this if nobody else beats me to it.

yesct’s picture

adding tags.

updating issue summary to note which tasks are suitable for novice (screenshot, steps to reproduce, manual testing)

yesct’s picture

Issue summary: View changes

Updated issue to current.

bannockree’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests, +Novice, +Needs screenshots, +refactor account workflow

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-2.patch, failed testing.

bannockree’s picture

Status: Needs work » Needs review
StatusFileSize
new17.46 KB
<<<<<<< HEAD
  form_load_include($form_state, 'inc', 'user', 'user.pages');
=======

  $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),
      ),
    )
  );
  module_load_include('inc', 'user', 'user.pages');
>>>>>>> Applying patch

This was the conflict.

This is how I fixed it:

  $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),
      ),
    )
  );
  module_load_include('inc', 'user', 'user.pages');
  

I removed:
<<<<<<< HEAD
form_load_include($form_state, 'inc', 'user', 'user.pages');
=======

because the patch has a call called module_load_include which appears to do the same thing.

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-34.patch, failed testing.

bannockree’s picture

Status: Needs work » Needs review
StatusFileSize
new119.75 KB

Here's the current drupal 8 screenshot of the configuration page:
without_patch.png

yesct’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests, +Novice, +Needs screenshots, +refactor account workflow

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-34.patch, failed testing.

yesct’s picture

+++ b/core/modules/user/user.installundefined
@@ -1056,5 +1056,24 @@ function user_update_8017() {
 /**
+ * Add variables for password_register to mail and settings.
+ *
+ * @ingroup config_upgrade
+ */
+function user_update_8011() {
+  update_variables_to_config('user.mail', array(
+    'register_password_set_activation_subject' => 'register_password_set_activation.subject',
+    'register_password_set_activation_body' => 'register_password_set_activation.body',
+    'register_password_set_subject' => 'register_password_set.subject',
+    'register_password_set_body' => 'register_password_set.body',
+  ));
+  update_variables_to_config('user.settings', array(
+    'user_password_register' => 'password_register',
+    'register_password_set_activation' => 'register_password_set_activation',
+    'register_password_set' => 'register_password_set',
+  ));
+}

is this a syntax error because we have cmi now?

yesct’s picture

Status: Needs work » Needs review
StatusFileSize
new566 bytes
new17.46 KB

nah, it's an actually php error, redeclaring a function. that update number is used. I changed it to the next update number.

Status: Needs review » Needs work
Issue tags: -Needs tests, -Novice, -Needs screenshots, -refactor account workflow

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-40.patch, failed testing.

mitron’s picture

Status: Needs work » Needs review
Issue tags: +Needs tests, +Novice, +Needs screenshots, +refactor account workflow
Rob C’s picture

Updated the patch from #40, this might break some bits, but let's see.

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-43.patch, failed testing.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new2.71 KB
new18.79 KB

Let's try that again. Removed whitespaces, added new options to scheme.yml and added setting to settings.yml.
Interdiff from 40. (forget the patch from #43)

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-45.patch, failed testing.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new2.91 KB
new17.39 KB

Ok, this should work, but does require some more work to get the .schema sorted. .settings is ok, the password_register option does not need to be set by default, but this does make me wonder...
Again, interdiff from 40. (and some variable names really need work)

Rob C’s picture

Issue summary: View changes

Updated issue summary. with pointers to novice.

Rob C’s picture

StatusFileSize
new45.63 KB

After screenshot.
drupal password option

Rob C’s picture

Issue summary: View changes

Updated to current.

yesct’s picture

checkbox says: Require people to ...
description says: Let people ...

sounds contradictory. we should maybe just leave off the first sentence of the description and let the checkbox option speak for itself.

(this is both needs work and needs review. :) )

yesct’s picture

Status: Needs review » Needs work
Issue tags: -Needs screenshots

removing needs screenshot tag and updating issue summary.
Add the tag back when a new patch is posted.

This is needs work for #49 But could also use some more review and manual testing of actually using the system with the various combinations of settings.

yesct’s picture

Issue tags: +Needs screenshots

I change my mind, adding make needs screenshot for screenshots of the account creation pages, admin and user creating.

yesct’s picture

Issue summary: View changes

Added screenshots

bannockree’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests, -Novice, -Needs screenshots, -refactor account workflow

Status: Needs review » Needs work
Issue tags: +Needs tests, +Novice, +Needs screenshots, +refactor account workflow

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-47.patch, failed testing.

bannockree’s picture

Issue tags: +Needs reroll
StatusFileSize
new130.56 KB
new116 KB

YesCT asked for before screenshots for the account creation pages for user and admin. I made them. I tried to apply the patch to make after screenshots, but the patch did not apply, so I queued the patch for re-testing.
This is the screen shot for a new user creating a new account:
new_account_without_patch.png
This is the screen shot for an admin adding an account for a new user:
admin_adding_user_without_patch.png
I set the status to needs work because the patch needs to be rerolled.

shnark’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new11.87 KB

I went through the instructions here:
http://drupal.org/patch/reroll
the only conflict was this:
http://privatepaste.com/3883a8701b
I asked in irc, and larowlan said that it was somthing that had been converted to wscci.
larowlan told me to look in core/modules/user/lib/Drupal/user/, and I found a file core/modules/user/lib/Drupal/user/AccountSettingsForm.php that contained something that looked like the conflict.
So I took out the conflict, because it was written elsewhere.
no interdiff because this is a reroll

kevin morse’s picture

andypost’s picture

Looks great UX, +1 to rtbc

Rob C’s picture

StatusFileSize
new72.48 KB
new75.61 KB
new17.44 KB

@YesCT #49

I've removed the first line, looks better, might need to add a small bit of text, but we have a 'manual / docs' page to explain this in detail i figured.

This patch includes the missing configuration options, @EllaTheHarpy these are now in core/modules/user/lib/Drupal/user/AccountSettingsForm.php

@andypost thanks!

@all

  • I have also added new before/after screenshots for the configuration page.
  • We could use some more manual testing confirmations + overall reviews.
  • We still require some tests.
  • We could also already start on a small documentation-piece (maybe).
Rob C’s picture

Issue summary: View changes

added remaining task to improve text

andypost’s picture

Tests:
- check presence of password field on form after option enabled|disabled
- check that user can login with the password
- make sure mail messages sent

suppose better to extend existing tests

@Rob C when you file new patches please provide a interdiff of changes, that makes people follow the changes

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-58.patch, failed testing.

Rob C’s picture

@andy

interdiff: if i change anything i'll create one. (see above) this is almost the exact same patch as in #47 ... and that has an interdiff. (this is #55 + missing config pages).

"suppose better to extend existing tests"

Agreed.

I'm not yet sure why it failed this time, because when i review the code, + try it myself, the assertText is exactly like it is on the test (line 88 or something). I did see pifr having some issues last night...

erinclerico’s picture

Currently working on this issue

erinclerico’s picture

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-58.patch, failed testing.

Rob C’s picture

Rob C’s picture

Status: Needs review » Needs work

Like i expected, now the tests does not fail.

Ok, next stop: write / modify tests.

@YesCT: how's the language now?

pwieck’s picture

Issue tags: -Needs reroll

removing tag

andypost’s picture

Status: Needs review » Needs work
Issue tags: +Needs usability review, +Needs tests, +Needs screenshots, +refactor account workflow

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-58.patch, failed testing.

yesct’s picture

comparing the screenshots from #48 with the new ones in the issue summary, I think my concern in #50 is addressed.

The issue summary still needs screenshots of before and after the patch both for the user during account creation and also for admins, of each different combination of the checkboxes.

Rob C’s picture

No interdiff, it's a reroll + minor tweaks.

Changes:
Due to some core changes i've removed the value we used to set to get to the correct $op for sending the correct e-mail.
Also removed some additional code that core also already solves in User.php (core entity plugin) Core already sends out the correct e-mail, so no need to send it from here anymore. (at least, looks like it)

Added the first test, might want to move 1 bit to the password reset test and add additional minor tests to confirm some more, but it's a start.

@YesCT: Ok, great.

Possible checkbox combinations:
[X] Require e-mail verification when a visitor creates an account.
[X] Require people to choose a password during registration.
This is the first screenshot, people are required to set a password during registration, while verification is enabled.

[X] Require e-mail verification when a visitor creates an account.
[_] Require people to choose a password during registration.
This is the second screenshot, people are not able to set a password during registration, because verification is enabled.

[_] Require e-mail verification when a visitor creates an account.
[..] Require people to choose a password during registration.
No separate screenshot, but this is the same as the second screenshot, users need to set a password during registration and are directly authenticated after submit. [..] is the disabled checkbox (via #states).

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new20.12 KB

Ok, weird. Let's also test it.

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-71.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

Added new screenshots, updated issue status.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new20.12 KB

Same patch, someone beat me to update 8020 :/

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-74.patch, failed testing.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new20.08 KB

Minor tweak to how we call user_login_finalize(), now tests should not fail.

Status: Needs review » Needs work

The last submitted patch, drupal_115801_user_registration_password_set_checkbox-76.patch, failed testing.

Rob C’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests, -Needs screenshots

Updating tags, updating status.

Rob C’s picture

Issue summary: View changes

Added checkbox combination description + screenshots for user/register.

Rob C’s picture

Issue summary: View changes

Minor update to checkbox combinations, now it's correct.

jhedstrom’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

This needs a reroll at the very least.

botanic_spark’s picture

Assigned: Unassigned » botanic_spark
botanic_spark’s picture

Patch reroll

idebr’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
botanic_spark’s picture

Status: Needs work » Needs review
StatusFileSize
new350.43 KB

user.mail schema updated.

Status: Needs review » Needs work
botanic_spark’s picture

Status: Needs work » Needs review
StatusFileSize
new16.78 KB

Schema update and several typos fixed.

Status: Needs review » Needs work
botanic_spark’s picture

Status: Needs work » Needs review
StatusFileSize
new16.78 KB

Refactored some legacy code.

Status: Needs review » Needs work
kevineinarsson’s picture

The plugin.manager.entity service has been replaced by entity.manager since 8.0-alpha7. (https://www.drupal.org/node/2181815)

The patch in comment #88 calls plugin.manager.entity and therefore fails at line 869.

eyilmaz’s picture

Changing service name as suggested by kevineinarsson.

eyilmaz’s picture

Status: Needs work » Needs review
StatusFileSize
new16.2 KB
new994 bytes

New try, previous patch didn't apply correctly.

eyilmaz’s picture

Status: Needs review » Needs work

Test failed locally, working on it needs more work.

Bojhan’s picture

Issue tags: -Needs usability review
spadxiii’s picture

Patch seems to apply, but the tests fail because a user is created which is already activated (status = 1)?

I get a fatal error because test tries to find the user with the status = 0 in the selection. But because the user has status = 1, it can't find any and then tries to get the status of an item from an empty array ...

Have to figure out why the user is created with status = 1.
-> the if-statement was wrong: it checked if there was a uid available, while it should check if there wasn't

Setting the status to NULL seems to do the trick, except that the user now cannot activate its account: the reset link (user/reset/...) gives a nice access-denied-page (because the user is blocked...).

/me digs back in again for a little bit... added a new patch with some fixes/changes and a todo-list

spadxiii’s picture

Updated the patch a little bit:

  • Fixed an assert that used a different string to test with, also assertRaw instead of assertText
  • Fixed some checks for sending the correct email upon registration
  • Fixed the setting status to NULL in the RegisterForm
  • Corrected the message with further-instructions (email instead of e-mail, like the default one) + the assert for this string

Todo:

  • Fix the failing part of the test: user cannot activate its account and login
  • The password-reset link is weird as it tells the user to click the login-button and set a password, but a password was already set at registration?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

blazey’s picture

Issue summary: View changes
StatusFileSize
new16.65 KB

Attaching rerolled version of the patch from #98

blazey’s picture

Status: Needs work » Needs review

Go testbot!

Status: Needs review » Needs work

The last submitted patch, 102: 115801-102.patch, failed testing.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

geek-merlin’s picture

Version: 8.6.x-dev » 8.7.x-dev
Assigned: botanic_spark » Unassigned
Status: Needs work » Needs review
StatusFileSize
new17.07 KB

Patch #102 does not apply anymore, here's a current reroll.

Status: Needs review » Needs work

The last submitted patch, 110: drupal-115801-110-passwordregister.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

geek-merlin’s picture

Status: Needs work » Needs review
StatusFileSize
new17.05 KB

Here's a backport to 8.6

geek-merlin’s picture

And a backport to 8.6.2.

geek-merlin’s picture

Tests: Looks like simpletest api ran away and we must

use AssertMailTrait {
    getMails as drupalGetMails;
  }
Rob C’s picture

Status: Needs review » Needs work

Error: Call to undefined method Drupal\Tests\user\Functional\UserRegistrationTest::drupalGetMails()

Do remember something about AssertMailTrait, guess that didn't land yet when this patch was created - and this patch was never updated - until now.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tepelena’s picture

+1

vacho’s picture

Patch rerolled.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

bgronek’s picture

Hi all. It looks like this one has been out here for a while and, with 50 followers, it looks like there's a lot of interest in it. We're going to apply it to a current project and report back regarding testing in a Drupal Commerce environment. If there's anything we can do along the way to help this along, we're all in.

Rob C’s picture

Status: Needs work » Needs review
StatusFileSize
new16.72 KB

Reroll for 8.9.x.

1 var changed ($admin > $admin_create) + added the trait. Didn't test it yet.

Status: Needs review » Needs work

The last submitted patch, 121: drupal-8.6-115801-121-passwordregister.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

fox_01’s picture

Does #121 work with D 8.8? I would test the functions with commerce

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

vladimiraus’s picture

Status: Needs work » Reviewed & tested by the community

Manually tested with 8.9 and 9.0.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 121: drupal-8.6-115801-121-passwordregister.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ankithashetty’s picture

Status: Needs work » Needs review
StatusFileSize
new18.36 KB
new14.98 KB

Re-rolled the patch in #121 against 9.1.x branch. Included a diff_reroll_115802_121-127.txt file as well. Please review.

Thank you!

Status: Needs review » Needs work

The last submitted patch, 127: 115801_127.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ankithashetty’s picture

Status: Needs work » Needs review
StatusFileSize
new18.38 KB
new1.59 KB

Updated the patch. Please review.

Thank you!

Status: Needs review » Needs work

The last submitted patch, 129: 115801_128.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

anushrikumari’s picture

Status: Needs work » Needs review
StatusFileSize
new18.38 KB

Status: Needs review » Needs work

The last submitted patch, 131: 115801_131.patch, failed testing. View results

samiullah’s picture

@anushrikumari
I tested ur patch manually,
Looks good
Please fix the automated tests so that this can be moved further for RTBC

ossamaselim’s picture

@anushrikumari
thank you for your great patch, it works perfectly.
unfortunatly i see that the patch doesn't pass the automated tests so it fails :(
did you fix this part?
tks

vladimiraus’s picture

Status: Needs work » Needs review
StatusFileSize
new36.47 KB
new25.3 KB

Fixed few phpcs issues along with few DIs.

Status: Needs review » Needs work

The last submitted patch, 135: drupal-set_password-115801-135.patch, failed testing. View results

vladimiraus’s picture

Status: Needs work » Needs review
StatusFileSize
new40.94 KB
new18.25 KB

Status: Needs review » Needs work

The last submitted patch, 137: drupal-set_password-115801-137.patch, failed testing. View results

vladimiraus’s picture

Status: Needs work » Needs review
StatusFileSize
new42.55 KB
new19.86 KB

Status: Needs review » Needs work

The last submitted patch, 139: drupal-set_password-115801-139.patch, failed testing. View results

anmolgoyal74’s picture

Status: Needs work » Needs review
StatusFileSize
new42.26 KB
new14.79 KB

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

vladimiraus’s picture

StatusFileSize
new41.98 KB

Fixes minor issues with previous patch plus 9.2 ready.
Also works for 9.1

bserem made their first commit to this issue’s fork.

bserem’s picture

#143 works as advertised but it touched lines of code that it shouldn't.
The attached patch and MR 126 correct these changes.

An interdiff and a new patch are also attached, as well as the gitlab merge request.

I am leaving this to needs review, since I made changes to the patch.

xavier.masson’s picture

StatusFileSize
new36.52 KB
new11.13 KB

Reroll for latest 9.2x

xavier.masson’s picture

Reroll for latest 9.1.x

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vikashsoni’s picture

@xavier.masson patch #147, #148 giving error patch is not applying sharing screenshot ...

ankithashetty’s picture

StatusFileSize
new31.22 KB
new26.25 KB

Rerolled the above patch and attached an interdiff as well. Please review.

In the rerolled patch, updated the changes in core/modules/user/tests/src/Functional/UserRegistrationTest.php and addressed #3212034: Account emails are missing newlines due to malformed YAML and #2844452: Export configuration YAML strings as multiline in core/modules/user/config/install/user.mail.yml .

Thank you!

vladimiraus’s picture

StatusFileSize
new31.25 KB
prabhat burnwal’s picture

heni_deepak’s picture

StatusFileSize
new102.53 KB
new56.11 KB

#152 & #153 Patch Not apply.

chetanbharambe’s picture

Status: Needs review » Needs work
StatusFileSize
new883.47 KB

HI @VladimirAus and @Prabhat Burnwal,

Above test cases, #152 and #153 is getting failed.
Can you please check it once again and attached some before and after screenshots.

Please refer attached screenshots.
Can be a move to Needs work.

vsujeetkumar’s picture

Issue tags: -refactor account workflow +refactor account workflow Needs reroll

Re-roll patch required for 9.3.x.

vsujeetkumar’s picture

Status: Needs work » Needs review
StatusFileSize
new30.47 KB

Re-roll path crated for 9.3.x.

vsujeetkumar’s picture

Issue tags: -refactor account workflow Needs reroll +refactor account workflow
StatusFileSize
new30.49 KB
new873 bytes

Fixed the fail test, Added the missing schema for "user.settings:notify.register_password_set".

Status: Needs review » Needs work

The last submitted patch, 158: 115801-158.patch, failed testing. View results

vladimiraus’s picture

@vsujeetkumar what changes are you bringing in?
Would be good to have diff and description for comments 153-158.
For #152 I just rerolled patch to work on 9.2.x

vsujeetkumar’s picture

@vsujeetkumar what changes are you bringing in?

@VladimirAus I have added a interdiff in #158, Please have a look.

Would be good to have diff and description for comments 153-158.

Patch #153 has missed some changes, Also It is related to 9.2.x. And we have already a patch #151 in 9.3.x, according to me #151, #152 and #153 all are the same patch so we can consider the interdiff in #158.

For #152 I just rerolled patch to work on 9.2.x

If we check the comment #149 it is already moved to 9.3.x, After that we have one patch #151 also, So is there any reason to moved it back to 9.2.x?

vsujeetkumar’s picture

Status: Needs work » Needs review
StatusFileSize
new30.28 KB
new2.49 KB

Fixed the fail test for 9.3.x, Please have a look.

Status: Needs review » Needs work

The last submitted patch, 162: 115801-162.patch, failed testing. View results

vsujeetkumar’s picture

Status: Needs work » Needs review
StatusFileSize
new30.48 KB
new1.03 KB

Fixed the fail test, Please have a look.

vladimiraus’s picture

StatusFileSize
new30.63 KB

Rerolled patch to work with the latest 9.3 beta2

Status: Needs review » Needs work

The last submitted patch, 165: drupal-set_password-115801-165.patch, failed testing. View results

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

milos.kroulik’s picture

I can confirm that patch in #152 doesn't apply for 9.2. Fix would be much appreciated, since Open Social sites are stuck with 9.2.

klemendev’s picture

https://www.drupal.org/project/user_registrationpassword just got abandoned so this issue may be a bit more important now

nojj’s picture

maybe a stupid question, but:

how is the registration process on this site set up?

I would like to have the exact same procedure:

on registration form I enter email address and password, I get a confirmation email and when I klick it I get redirected to the site, where I tried to to leave a comment.

like here:
https://www.drupal.org/user/register?destination=node/115801

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mistrae’s picture

StatusFileSize
new30.6 KB

If visitors are allowed to create account without approval (UserInterface::REGISTER_VISITORS) and password is required only the "register_password_set_verification" should be sent.

With this patch "register_pending_approval" is sent. This email state that the account is not approved and that the user should wait on approval. It makes no sense.

mistrae’s picture

StatusFileSize
new30.56 KB

Config also need to be updated if you check the "register_password_set" or else the mail will never be send.
If symfony_mailer is used, it will need to be patched aswell or the mail will be empty.

trickfun’s picture

Patch works fine but how can activate the user?

i can't use [user:one-time-login-url] link.
If i click the link i get page not found.

Thank you

suresh prabhu parkala’s picture

StatusFileSize
new30.52 KB
new733 bytes

Tried to fix the custom errors in #173.

mistrae’s picture

StatusFileSize
new34.55 KB

Added some functions from module "User Registration Password" to activate the user on one-time-link use.

mistrae’s picture

pooja saraah’s picture

StatusFileSize
new34.64 KB
new3.1 KB

fixed failed commands against #176

pooja saraah’s picture

StatusFileSize
new34.54 KB
new3 KB

Fixed failed commands against #178

driskell’s picture

I have some concern with the approach here as it introduces changes to the meaning of "Blocked" accounts.

Currently, a blocked account is a blocked account. It can never login until activated.
After this change, a blocked account can be automatically unblocked via one-time-login-link if it was never logged in. There is no way to revoke that one-time-login-link to fully block such an account.

rymcveigh’s picture

It's worth noting that this patch relies on the [user:one-time-login-validate-url] token/url rather than the [user:one-time-login-url] token/url to activate the account. That wasn't very clear to me when applying this patch.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

ravi.shankar’s picture

StatusFileSize
new33.02 KB
new9.33 KB

Added reroll of patch #179 on Drupal 10.1.x and addressed Drupal CS issue as well.

voleger’s picture

StatusFileSize
new33.07 KB
new2.92 KB

Fixed the deprecation check issue

anchal_gupta’s picture

StatusFileSize
new33.07 KB

Re-upload the patch to fix the PHP unit fail.

voleger’s picture

#185 is the same as #184 as interdiff is empty
The failing test confirms the concern mentioned in #180, user blocking flow was affected and needs to be addressed.

vladimiraus’s picture

Status: Needs work » Needs review

Improved #185 patch and MR that works for 9.5.x, 10.0.x, 10.1.x.

Improvements

  • $current variable is not set
  • deprecated REQUEST_TIME replaced with time container
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs change record, +Needs upgrade path

Just skimming the MR 3121

There are CI failures.
The new configuration needs an upgrade path, with tests, for existing sites
Needs a change record for new setting

mistrae’s picture

The new determineErrorRedirect function (UserController.php) introduced in 9.5 throw an AccessDeniedHttpException if the user in not active. This should be addressed before merging anything.

Maybe create another route instead of using user.reset.login

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

linhnm’s picture

StatusFileSize
new39.07 KB

Reroll for latest 10.1.x. No other change.

vladimiraus’s picture

@linhnm what are the changes in the patch?
Can you please use existing MR or at least provide interdiff for easier review?
Thank you 🙏

linhnm’s picture

@VladimirAus I updated the MR

ershov.andrey’s picture

StatusFileSize
new31.9 KB

Make patch compatible with drupal core 10.2.3

mlncn’s picture

Status: Needs work » Needs review

Can't figure out how to get it to re-test on Drupal 11— it gives me Drupal 7 only as an option?!? So seeing if setting to Needs review kicks the bots into gear.

Also, for people looking for an immediate solution the module mentioned for D7, User Registration Password (user_registrationpassword) is available and supported for modern Drupal (8, 9, 10…) now!

smustgrave’s picture

Status: Needs review » Needs work

Should be turned to an MR. Didn’t check to see if the tags have been added

VladimirAus changed the visibility of the branch 115801-allow-password-on-register to hidden.

VladimirAus changed the visibility of the branch 10.1.x to hidden.

VladimirAus changed the visibility of the branch 115801-10.1.x-password to hidden.

vladimiraus’s picture

Status: Needs work » Needs review

MR is published.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new3.82 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

biancaradu27’s picture

Make patch compatible with drupal core 10.3.x

biancaradu27’s picture

I have created a new patch and added a new modification. For our case the register process gives access defined so had to do another change in the determineErrorRedirect on UserController.php

adinac’s picture

Re-roll for #207
Some changes that needed to be addressed:
- in AccountSettingsForm.php the #config_target property needs to be used
- _user_mail_notify() doesn't send e-mails if \Drupal::config('user.settings')->get('notify.' . $op) is false

adinac’s picture

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.