# Summary
Let users register with a password on the registration form when verification mail is required.
By default, users can create accounts directly on the registration form, set their password and be immediately logged in, or they can create their account, wait for a verification e-mail, and then create their password. With this module, users are able to create their account along with their password and simply activate their account when receiving the verification email.
# Project URL
https://www.drupal.org/project/user_registrationpassword
# Where is the code?
https://github.com/swentel/user_registrationpassword
# Estimated completion date
Week of 20 may.
# Dependencies
None
# Who's doing the port?
swentel
# What help do they need?
#2765437: _user_mail_notify() always sends emails even if $notify is FALSE
# D8 roadmap
N/A
# Background and reference information
N/A
Comment | File | Size | Author |
---|---|---|---|
#9 | 2728255-9.patch | 6.35 KB | gambry |
Comments
Comment #2
swentel CreditAttribution: swentel commentedCode is available on github. Tests are green.
It's a mimimal port where I left out
- commerce integration
- the whole install/uninstall dance of the activation mail
It needs a double check on language when sending the as well.
But maybe this can be merged in already ?
Comment #3
swentel CreditAttribution: swentel at eps & kaas for MuseScore commentedAdding credits
Comment #4
Rob C CreditAttribution: Rob C commentedGreat work, sadly i was also working on a port, but never finished, so thanks. Do wonder about how you got it all to work, i'll do a code review + test this weekend.
Commerce support was based on a Commerce install + commerce_checkout_redirect, but also works without it.
While Commerce 2.x is in active development, i wonder if this is still required, so we might want to implement this at a later time once Commerce is stabilizing a bit beyond where it now is. (it does not block any release anyhow).
The install 'dance' helped a lot of people to get things right from the start, but we might want to rethink it (depending on whats possible now in D8).
Code has been pushed to d.o. and the issue queue is open for issues.
Comment #5
swentel CreditAttribution: swentel at eps & kaas for MuseScore commentedTo clarify, there's still an install hook that sets sensible defaults and the default mail information is now moved to a config file.
That allowed me to remove the code in the test that was setting this up.
The good thing is that the tests are green, so it's to refactor and or add new things if desired :)
Moving to needs work since there's an D8 branch, cool!
Comment #6
MustangGB CreditAttribution: MustangGB commentedComment #7
amh5514 CreditAttribution: amh5514 commentedHi, I can't get the token [user:registration-password-url] to work. If I activate and test the module by creating a new account, the account is automatically blocked and the verification email I receive is the "Welcome(Awaiting approval)" template. If I try to move the [user:registration-password-url] into this template and save, I get this warning "The Body is using the following invalid tokens: [user:registration-password-url]."
the "who can register" is set to visitor
the "Require e-mail verification when a visitor creates an account" is set to " Require a verification e-mail, but let users set their password directly on the registration form."
I glanced through the module and noticed a dependency on the rpt module ( http://drupal.org/project/rpt ) and I'm not sure if that missing module is the source of the problem
Comment #8
amh5514 CreditAttribution: amh5514 commentedI ran this on a clean install and the same happens except for the invalid token warning.
I added the token to the block account and activate account templates and received nothing in the email
This could be a very useful module, hopefully we can get this working soon.
Thanks in advance
Comment #9
gambryI made some changes in order for the module to work.
Now I get emails and right messages, although I haven't tested all the scenarios (only Visitors don't need approval + USER_REGISTRATIONPASSWORD_VERIFICATION_PASS) so a more general test is needed.
However the _user_mail_notify() (user.module) has changed:
D7
D8
So even setting
notify.register_pending_approval
to FALSE will send the approval emails to admin anyway. This needs a core change. :(Comment #10
gambryI've opened an issue on the Drupal core queue, let's see if it can be changed from there or if this module should find a different approach on D8.
Comment #11
Rob C CreditAttribution: Rob C commentedI've already tried to report this issue, but this has been closed. Couldn't change the title, but didn't forgot about it. #2100111: (possible) regression: can not form_alter and change default_value for 'status' during registration / change user_mail_notify() This was why i never continued my port, would be great if we can get this changed back to something that's usable again. (or we need to duplicate lots of code)
Comment #12
gambryHopefully with the difference described in the issue, the steps to reproduce and the patch to fix it will be more difficult to close without an explanation. Please if you are interested on having this module up and running on D8 subscribe/follow #2765437: _user_mail_notify() always sends emails even if $notify is FALSE.
Comment #13
gambryComment #14
gambryCan anybody following this thread please have a look at #2765437: _user_mail_notify() always sends emails even if $notify is FALSE?
Review/Test it so we can make progress in here too.
Comment #15
Rob C CreditAttribution: Rob C commentedChanges from #9 have been committed. So i think we can close this up. Thanks swentel and gambry!
The first alpha release for Drupal 8 is available here.
Please start issues in the user_registrationpassword issue queue for the Drupal 8 version from now on available here.