I've looked a bit into it and this is what I think happens:
- the user class implements a flag "verified" which corresponds to the "validated" flag of MegaProtoUser
- There is a method in User "handleLoginToken" that is activated with a special token link (see below) and if the link is correct the user is verified and logged in
This method is currently used when an existing user forgot his password.
- When an existing user forgot his password the method "User.sendLoginToken" sends the token mail.
Now, there seems to be nothing in the module to send that mail after a user registers. To do that, I would suggest:
- Change the LoginToken to add some param that says this is only verification, like "&verify=true". You need that flag later in "handleLoginToken" to decide where to go after the token has been successfully applied. Right now it always goes to a page where you can change your password, you may want to go straight to the index page.
- Change the "RegisterScreen" finish method to send a verification email. Better yet I would think, add a method to the user that handles the creation of a user record with all the collected data and then asks a flag whether to send the verification email (a bit like MegaProtoUser). That way you can change the way users register and don't have to duplicate the behavior.
That's what I have learned so far from the module.
I'd like @Tim to either correct or confirm it.
Hope that helps,
Am 13.10.2012 um 00:31 schrieb alexmnyc <a.mikhai...@gmail.com>: