Looking into this module to merely allow users create multiple accounts as my use-case is to use the registration form to access content as well as create a reservation request. Rather than stopping someone who's entered an account in the past with a error, I'd like to let them create a second account. (Most people don't continue to use their account, though it's important to let people go forward with an account who want to.)
Anyhow, when someone tries to reset their password with their email (and two accounts have that email) are emails sent to both accounts?
I saw sharedemail_pass_reset but usernames will need to be hidden from users via Real Name.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | sharedemail-send_multiple_login_names-1203504-12.patch | 3 KB | samuelsov |
| #7 | sharedemail-fix_multiple_password_reset-1203504-7.patch | 1.92 KB | ccrosaz |
Comments
Comment #1
christefano commentedThe way Shared Email works is that an email is sent to the email address attached to the account that performed the password reset request.
In other words, if account A and account B have the same address, an email will be sent to the shared email address regardless of which account was used.
Does this answer your question?
Comment #2
doublejosh commentedSounds like two emails will be sent, no?
Referring to resetting a password where just an email address is entered as a logged out user.
Comment #3
wesayso commentedNo, only one email will be sent. The one-time link in that email will log you into one of the accounts that shares that email address (probably the oldest account, the one with the lowest uid) so you can reset the password. To reset the password for the other account, the user would have to type in the username instead of the email address on the request new password form.
I think I can write a patch to send a password recovery email for every account that shares the same email address.
Comment #4
christefano commented@wesayo: a patch would be great. Thanks! Please feel free to open a new issue for this:
http://drupal.org/node/add/project-issue/sharedemail
I believe this issue has been answered and I'm marking it as fixed. We can update Shared Email's documentation if wesayo's patch goes into a future release.
Comment #6
aaronbaumanThis thread doesn't definitively answer the original question, nor does documentation (that I could fine).
"probably"? is this based on intricacies of mysql, or other factors?
Comment #7
ccrosazHello @christefano,
I had this need for a project where I use Shared E-mail and import the accounts with feeds. My users can potentially have two accounts with the same email address, with different roles.
I prepare a patch I've made for it, and I hope I've done it well (this is my first patch on a Drupal project).
The idea of this patch is to modify the behaviour of the user_pass form validation and submit methods, to use all the records found in the user table.
Just to be sure, here is the code I add in the module :
Comment #8
baikho commentedComment #9
baikho commentedComment #10
baikho commentedTo re-iterate on this, I can verify on #3 that effectively the lowest uid for given email address is used for the password reset.
See relevant explanatory code below, from core user module:
This would indeed mean that only the first user for an email address can have its password reset through the generic password reset form, so I believe this can be classified as a bug.
#7 looks promising but it needs some good review / testing before it can be included.
Comment #11
baikho commentedComment #12
samuelsov commentedBased on ccrosaz patch, i've done another possible way of solving this issue :
* if there is only one corresponding account, it will simply send the standard reset password message
* if several account correspond to the email, it will send an email with the available login name for this email that they can use to ask for a reset
It's a multi-step process but i think it will scale better if we have more than 2-3 account associated with the same email.
The message could be improved and we might add direct links to password reset for each user. Even better if we could trigger the password reset email with a link without having to submit a form.