Revalidate E-Mail Address upon user changes E-Mail Address
Permalink
Hi all!
Is there a simple way to trigger the "user must validate his e-mail address" process?
Situation: User can register and then edit his personal data, so he can also change his email Address, which is ok, he might want to use another or...whatever
Problem: No revalidation of new Email-Address...
Is there a simple way?
Regards,
André
Is there a simple way to trigger the "user must validate his e-mail address" process?
Situation: User can register and then edit his personal data, so he can also change his email Address, which is ok, he might want to use another or...whatever
Problem: No revalidation of new Email-Address...
Is there a simple way?
Regards,
André
Hi!
Thanks for the fast answer, but what exactly do I need v() for? To me it seems to mark the user as validated and does not send the mail... The later function (markNotValidated) seems more useful, but how do i create the new hash (do i have to?) and resend the mail?
Regards,
André
Thanks for the fast answer, but what exactly do I need v() for? To me it seems to mark the user as validated and does not send the mail... The later function (markNotValidated) seems more useful, but how do i create the new hash (do i have to?) and resend the mail?
Regards,
André
The function i put together for you (markNotValidated) marks the users record as not being validated anymore.
After you run that function you will need to call v() to generate the new validation hash and send the new email to the user.
So yes, the v() function creates the new hash and sends the user the email containing it.
O
After you run that function you will need to call v() to generate the new validation hash and send the new email to the user.
So yes, the v() function creates the new hash and sends the user the email containing it.
O
If you have a look inside the login contoller, within /concrete/controllers/login.php, you will see the function:
This is what is called to send the validation e-mail & setup the validation token.
The easiest way is to copy this function into your profile edit controller and then call it on edit, you will also need to set the validation entry within the users table back to false (to prevent the user logging in again until the address is revalidated. You could do this with another function in your profile controller like this:
Then you'll need to log the user out and tell them to check thier mail.
Should steer you in the right direction,
Oli