I'm using wordpress social login plugin.. It uses HybridAuth library.
Here is a demo of HybridAuth library.
The wordpress plugin looks nice. But it generates a random email for most of the social sites.
This plugin doesn't offer email verification for the sites which doesn't offer verified email address.
I mean the plugin says
Currently only Facebook, Google, Yahoo and Foursquare do provide the verified user email
So for other sites it generates a random email address. This is the code which generates random email
// generate an email if none
if ( ! isset ( $user_email ) OR ! is_email( $user_email ) ){
$user_email = strtolower( $provider . "_user_" . $user_login ) . "@example.com";
}
// email should be unique
if ( email_exists ( $user_email ) ){
do
{
$user_email = md5(uniqid(wp_rand(10000,99000)))."@example.com";
} while( email_exists( $user_email ) );
}
I want all my accounts in my sites to be verified. So instead of generating random email I need a function that popup a form by asking the user to fill his/her email address.
And then when a user click submit it should send a confirmation link or randomly generated password to their email.
Can anyone help me to implement this.? Here is the full code which process the signup/login