Leave a Reply

2 comments

  1. Consider these resources:

    The concept behind this would be to send a randomly generated string to the mobile phone number that the user enters, store it as a transient, and ask the user to enter it to send him his/her password via e-mail.

    wp-login.php?action=register already does half of the job – sending he password to the registered person, you would only have to stop lay this process off until the password from the SMS is provided.

    So an options would be:

    1. User registers, entering his phone number along with his e-mail
    2. E-mail with random password is not sent
    3. Random code is generated and sent using any SMS gateway API and stored in transients along with the user ID
    4. User enters code and any pending transients matching that code and user ID will release the registration e-mail with the password

    Alternatively you can:

    1. Stop e-mail from going out with the password
    2. Send password through SMS gateway instead

    The second option is very very simple, most gateways provide PHP libraries that you can use to interface with the API, override the wp_mail() pluggable to send the password through the gateway.