easier password reset process, fixed #1781, plus some minor fixes#3178
easier password reset process, fixed #1781, plus some minor fixes#3178Guite merged 5 commits intozikula:1.4from Guite:issue-1781
Conversation
|
ready to review |
| 'uid' => $requestDetails['userId'], | ||
| 'uname' => $requestDetails['userName'], | ||
| 'email' => $requestDetails['emailAddress'] | ||
| ]); |
There was a problem hiding this comment.
when using the uid you will only get one record or null. There is no possibility of more. you can simply use the uid and the find method and then check for null.
also this is from the user_repository. Anyone that has logged in since upgrade past 1.4.3 will have had their record migrated to the zauth_authentication_mapping table. So this will not work.
There was a problem hiding this comment.
well, I did not invent this, but rewrote the code which was there; so if it does not work it didn't work before, too
There was a problem hiding this comment.
that's simply not true. The previous code only searched based on email. Such a search may possibly return several rows because in the past, the email has not been required to be unique. You are searching based on multiple params including the uid, which must be unique, therefore it will only return one row and using the find method is appropriate.
There was a problem hiding this comment.
I meant
also this is from the user_repository. Anyone that has logged in since upgrade past 1.4.3 will have had their record migrated to the zauth_authentication_mapping table. So this will not work.
|
to review in combination with the #3177: User data is migrated from the This means you will need to have a 'new' method which uses I didn't walk though each line of this PR yet, but it appears you haven't considered the |
again: I reused the code which was there; so if it has serious problems those are general and very probably subject of another issue |
if it works, great! I'm just asking you to check both possibilities:
|
|
Tested both. Both work. |
Notes:
This does still use the verification entity and confirmation codes. So for example the expiry is still handled by that.
But there are some essential behavioural differences:
LostPasswordVerificationHelper) encapsulates the details, making the controllers a bit more slim.This PR also addresses some minor bugs I've found, like non-absolute urls in the email templates and wrong usage of the
MailerApiin theMailHelperclass.