Posted on 31/07/2016 04:21:02
Hi Nicolai,
The template provided in the empty solutionset has a check within the template that prevents this from working if there is more than 1 account found:
<!--@If(UserManagement:User.Login.FoundUsersCount=0 || UserManagement:User.Login.FoundUsersCount>1)-->
<div class="info-pane error">User not found!</div>
<!--@EndIf-->
That's from a fresh download from the developer portal. (\Files\Templates\UserManagement\Login\password_recovery.html). We have an updated Razor version that we use, but it has the same issue.
When I remove that check for FoundUsersCount > 1, there is a postback to the same page but it doesn't return the expected data and it doesn't send the email.
When outputting the POST data after submitted the email address, it's the same for each:
ForgotPasswordMailTemplate Login/PasswordRecoveryEmail.html
ForgotPasswordSenderEmail noreply@company.com
ForgotPasswordMailSubject Denville - Recover password
AccessUserEmail email_with_1_occurance@domain.com
LoginAction Recovery
This works, and the logic for UserManagement:User.Login.Action is correctly set to "RecoveryLinkSent" in the template, so even though the POST data shows LoginAction = Recovery, the template tags were able to determine that it's a successful submission.
However, with the other email address, it doesn't work. The POST data looks like this:
ForgotPasswordMailTemplate Login/PasswordRecoveryEmail.html
ForgotPasswordSenderEmail noreply@company.com
ForgotPasswordMailSubject Denville - Recover password
AccessUserEmail email_with_many_occurances@domain.com
LoginAction Recovery
And UserManagement:User.Login.Action is set to "Recovery" in the template tags.
So it seems that it's not handling the multiple accounts with the same email, or at least not as I would assume.
Thanks,
Scott