Closed DrAliRagab closed 3 years ago
Thanks for this PR, this seems like a great addition. Here are a couple of changes to consider:
To resend emails I would expect the controller logic to be something like $this->ionAuth->deactivate($user->id)->sendActivationEmail($user->identity)
.
Also, please combine the changes from #1507 into this PR. I'll be closing that one.
I think it is better to keep register and send email activation to separate functions. And we should keep deactivate so we change the activation link every new request.
This is looking great.
One last thing, can you refactor the register() method to use sendActivationEmail(), that way we're reducing the duplicated code there.
While working I want to send email to user if his password changed successfully.
So I wrote sendEmail()
function.
I think it will reduce duplicated code here. Also, may be useful for further expansion of this Auth system.
Good review.
Thanks!
I think you should have function to resend activation email if the first one was not sent successfully. Depending on that code I think I made a working function.
The only problem I can't get identity to be sent to email activation, I tried but I failed. I don't know how to get the identity field. Actually I didn't tried that hard because I don't need it at activation email, I just want first and last name.