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
Cleanup.Done- (novice) document steps to test/reproduce (how to: http://drupal.org/node/1468198)
- (novice) manual testing (how to: http://drupal.org/node/1489010)
- (novice)
Remove that 1 whitespace error.Done (how to: http://drupal.org/node/1487976) - (novice)
Improve text on checkbox and help text.Done. See #49 (how to make patch: contributor task: http://drupal.org/node/1424598) Writing tests.(how to: http://drupal.org/node/1468170)- Improve tests. (how to: http://drupal.org/node/1468170)
- More testing.
- (novice)
Update / create new screenshots after pull.Done. (a new option was added on this page)
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:

After:

First 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?
Issue fork drupal-115801
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
Comment #1
cosmicdreams commentedInteresting...
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?
Comment #2
elv commentedGenerated 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.
Comment #3
travischristopher commentedtry http://drupal.org/project/logintoboggan
Comment #4
Anonymous (not verified) commentedThe user experience project is closing so this issue is being moved to the usability component under the Drupal project
Comment #5
ainigma32 commentedAs 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
Comment #6
damien tournoud commentedPromoted to an usability task. I think there is a considerable margin for improvement here.
Comment #7
damien tournoud commented@elv and the rest of the usability team: could you suggest a mock-up of how this could be improved?
Comment #8
Bojhan commentedDoesn'st seem like a mockup would be required, only a patch to let the user enter a password instead of not?
Comment #9
damien tournoud commented@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.
Comment #10
Bojhan commentedTo 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.
Comment #11
Tor Arne Thune commentedIn Drupal 7.0 there is an option to "Require e-mail verification when a visitor creates an account" at
admin/config/people/accounts/settings.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.
Comment #12
EarthLaunch commentedThis 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
Comment #13
drupalreggie commented+ 1
Comment #14
jherencia commentedComment #15
jlp1 commented+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!
Comment #16
andypostLooks like not very popular feature
Comment #17
Rob C commentedAs 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
Comment #18
Rob C commentedUser 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.)
Comment #20
Rob C commentedDear testbot, your so right. Let's try that again.
Comment #21
Rob C commentedI 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.'
Comment #22
Rob C commentedAnd 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.
Comment #22.0
Rob C commentedAdded a bit more info.
Comment #23
chx commentedThanks 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.
Comment #24
chx commentedHrm, the tag didnt get added somehow.
Comment #25
Rob C commentedchx, 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.
Comment #26
Rob C commentedThis 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.
Comment #27
fabianx commentedThis logic seems a little strange. At least some () around && are missing.
Why is this extra if necessary?
Can't the logic be done directly above?
Currently I find it more confusing than helping.
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 ...
Comment #29
Rob C commentedOk, 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.
Comment #29.0
Rob C commentedMinor update, added current patches + updated some info.
Comment #29.1
Rob C commentedUpdated current info, added more details.
Comment #30
Rob C commentedAdded 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.
Comment #31
yesct commentedadding tags.
updating issue summary to note which tasks are suitable for novice (screenshot, steps to reproduce, manual testing)
Comment #31.0
yesct commentedUpdated issue to current.
Comment #32
bannockree commented#29: drupal_115801_user_registration_password_set_checkbox-2.patch queued for re-testing.
Comment #34
bannockree commentedThis was the conflict.
This is how I fixed it:
I removed:
<<<<<<< HEADform_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.
Comment #36
bannockree commentedHere's the current drupal 8 screenshot of the configuration page:

Comment #37
yesct commented#34: drupal_115801_user_registration_password_set_checkbox-34.patch queued for re-testing.
Comment #39
yesct commentedis this a syntax error because we have cmi now?
Comment #40
yesct commentednah, it's an actually php error, redeclaring a function. that update number is used. I changed it to the next update number.
Comment #42
mitron commented#40: drupal_115801_user_registration_password_set_checkbox-40.patch queued for re-testing.
Comment #43
Rob C commentedUpdated the patch from #40, this might break some bits, but let's see.
Comment #45
Rob C commentedLet'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)
Comment #47
Rob C commentedOk, 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)
Comment #47.0
Rob C commentedUpdated issue summary. with pointers to novice.
Comment #48
Rob C commentedAfter screenshot.

Comment #48.0
Rob C commentedUpdated to current.
Comment #49
yesct commentedcheckbox 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. :) )
Comment #50
yesct commentedremoving 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.
Comment #51
yesct commentedI change my mind, adding make needs screenshot for screenshots of the account creation pages, admin and user creating.
Comment #51.0
yesct commentedAdded screenshots
Comment #52
bannockree commented#47: drupal_115801_user_registration_password_set_checkbox-47.patch queued for re-testing.
Comment #54
bannockree commentedYesCT 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:
This is the screen shot for an admin adding an account for a new user:
I set the status to needs work because the patch needs to be rerolled.
Comment #55
shnark commentedI 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
Comment #56
kevin morse commented#55: drupal_115801_user_registration_password_set_checkbox-55.patch queued for re-testing.
Comment #57
andypostLooks great UX, +1 to rtbc
Comment #58
Rob C commented@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
Comment #58.0
Rob C commentedadded remaining task to improve text
Comment #59
andypostTests:
- 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
Comment #61
Rob C commented@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...
Comment #62
erinclerico commentedCurrently working on this issue
Comment #63
erinclerico commented#58: drupal_115801_user_registration_password_set_checkbox-58.patch queued for re-testing.
Comment #65
Rob C commented#58: drupal_115801_user_registration_password_set_checkbox-58.patch queued for re-testing.
Comment #66
Rob C commentedLike i expected, now the tests does not fail.
Ok, next stop: write / modify tests.
@YesCT: how's the language now?
Comment #67
pwieck commentedremoving tag
Comment #68
andypost#58: drupal_115801_user_registration_password_set_checkbox-58.patch queued for re-testing.
Comment #70
yesct commentedcomparing 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.
Comment #71
Rob C commentedNo 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).
Comment #72
Rob C commentedOk, weird. Let's also test it.
Comment #73.0
(not verified) commentedAdded new screenshots, updated issue status.
Comment #74
Rob C commentedSame patch, someone beat me to update 8020 :/
Comment #76
Rob C commentedMinor tweak to how we call user_login_finalize(), now tests should not fail.
Comment #78
Rob C commentedUpdating tags, updating status.
Comment #78.0
Rob C commentedAdded checkbox combination description + screenshots for user/register.
Comment #78.1
Rob C commentedMinor update to checkbox combinations, now it's correct.
Comment #79
jhedstromThis needs a reroll at the very least.
Comment #80
botanic_spark commentedComment #81
botanic_spark commentedPatch reroll
Comment #82
idebr commentedComment #84
botanic_spark commenteduser.mail schema updated.
Comment #86
botanic_spark commentedSchema update and several typos fixed.
Comment #88
botanic_spark commentedRefactored some legacy code.
Comment #90
kevineinarsson commentedThe 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.
Comment #91
eyilmazChanging service name as suggested by kevineinarsson.
Comment #92
eyilmazNew try, previous patch didn't apply correctly.
Comment #93
eyilmazTest failed locally,
working on itneeds more work.Comment #96
Bojhan commentedComment #97
spadxiii commentedPatch 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-listComment #98
spadxiii commentedUpdated the patch a little bit:
Todo:
Comment #102
blazey commentedAttaching rerolled version of the patch from #98
Comment #103
blazey commentedGo testbot!
Comment #110
geek-merlinPatch #102 does not apply anymore, here's a current reroll.
Comment #112
geek-merlinHere's a backport to 8.6
Comment #113
geek-merlinAnd a backport to 8.6.2.
Comment #114
geek-merlinTests: Looks like simpletest api ran away and we must
Comment #115
Rob C commentedDo remember something about AssertMailTrait, guess that didn't land yet when this patch was created - and this patch was never updated - until now.
Comment #117
tepelena commented+1
Comment #118
vacho commentedPatch rerolled.
Comment #120
bgronek commentedHi 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.
Comment #121
Rob C commentedReroll for 8.9.x.
1 var changed ($admin > $admin_create) + added the trait. Didn't test it yet.
Comment #123
fox_01 commentedDoes #121 work with D 8.8? I would test the functions with commerce
Comment #125
vladimirausManually tested with 8.9 and 9.0.
Comment #127
ankithashettyRe-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!
Comment #129
ankithashettyUpdated the patch. Please review.
Thank you!
Comment #131
anushrikumari commentedComment #133
samiullah commented@anushrikumari
I tested ur patch manually,
Looks good
Please fix the automated tests so that this can be moved further for RTBC
Comment #134
ossamaselim commented@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
Comment #135
vladimirausFixed few phpcs issues along with few DIs.
Comment #137
vladimirausComment #139
vladimirausComment #141
anmolgoyal74 commentedComment #143
vladimirausFixes minor issues with previous patch plus 9.2 ready.
Also works for 9.1
Comment #146
bserem commented#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.
Comment #147
xavier.massonReroll for latest 9.2x
Comment #148
xavier.massonReroll for latest 9.1.x
Comment #150
vikashsoni commented@xavier.masson patch #147, #148 giving error patch is not applying sharing screenshot ...
Comment #151
ankithashettyRerolled 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.phpand addressed #3212034: Account emails are missing newlines due to malformed YAML and #2844452: Export configuration YAML strings as multiline incore/modules/user/config/install/user.mail.yml.Thank you!
Comment #152
vladimirausComment #153
prabhat burnwal commentedComment #154
heni_deepak commented#152 & #153 Patch Not apply.
Comment #155
chetanbharambe commentedHI @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.
Comment #156
vsujeetkumar commentedRe-roll patch required for 9.3.x.
Comment #157
vsujeetkumar commentedRe-roll path crated for 9.3.x.
Comment #158
vsujeetkumar commentedFixed the fail test, Added the missing schema for "user.settings:notify.register_password_set".
Comment #160
vladimiraus@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.xComment #161
vsujeetkumar commented@VladimirAus I have added a interdiff in #158, Please have a look.
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.
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?
Comment #162
vsujeetkumar commentedFixed the fail test for 9.3.x, Please have a look.
Comment #164
vsujeetkumar commentedFixed the fail test, Please have a look.
Comment #165
vladimirausRerolled patch to work with the latest 9.3 beta2
Comment #168
milos.kroulik commentedI 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.
Comment #169
klemendev commentedhttps://www.drupal.org/project/user_registrationpassword just got abandoned so this issue may be a bit more important now
Comment #170
nojj commentedmaybe 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
Comment #172
mistrae commentedIf 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.
Comment #173
mistrae commentedConfig 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.
Comment #174
trickfun commentedPatch 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
Comment #175
suresh prabhu parkala commentedTried to fix the custom errors in #173.
Comment #176
mistrae commentedAdded some functions from module "User Registration Password" to activate the user on one-time-link use.
Comment #177
mistrae commentedComment #178
pooja saraah commentedfixed failed commands against #176
Comment #179
pooja saraah commentedFixed failed commands against #178
Comment #180
driskell commentedI 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.
Comment #181
rymcveighIt'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.Comment #183
ravi.shankar commentedAdded reroll of patch #179 on Drupal 10.1.x and addressed Drupal CS issue as well.
Comment #184
volegerFixed the deprecation check issue
Comment #185
anchal_gupta commentedRe-upload the patch to fix the PHP unit fail.
Comment #186
voleger#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.
Comment #188
vladimirausImproved #185 patch and MR that works for 9.5.x, 10.0.x, 10.1.x.
Improvements
$currentvariable is not setREQUEST_TIMEreplaced with time containerComment #189
smustgrave commentedJust 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
Comment #192
mistrae commentedThe new
determineErrorRedirectfunction (UserController.php) introduced in 9.5 throw anAccessDeniedHttpExceptionif the user in not active. This should be addressed before merging anything.Maybe create another route instead of using
user.reset.loginComment #194
linhnm commentedReroll for latest 10.1.x. No other change.
Comment #195
vladimiraus@linhnm what are the changes in the patch?
Can you please use existing MR or at least provide interdiff for easier review?
Thank you 🙏
Comment #196
linhnm commented@VladimirAus I updated the MR
Comment #197
ershov.andrey commentedMake patch compatible with drupal core 10.2.3
Comment #198
mlncn commentedCan'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!
Comment #199
smustgrave commentedShould be turned to an MR. Didn’t check to see if the tags have been added
Comment #204
vladimirausMR is published.
Comment #205
needs-review-queue-bot commentedThe 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.
Comment #206
biancaradu27 commentedMake patch compatible with drupal core 10.3.x
Comment #207
biancaradu27 commentedI 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
Comment #208
adinac commentedRe-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
Comment #209
adinac commentedRe-roll for drupal 11