Validate a users email address when using gmail to register

Hmm, should try harder before asking for help 🙂 Was quite simple in the end (right or wrong) it works: $domain_array = array(‘googlemail.com’,’gmail.com’); $validemail = is_email($email_to_check); $exists_text=””; if ($validemail): $exists = email_exists($email_to_check); list($user, $domain) = explode(‘@’, $email_to_check); if (!$exists): if (strpos($user, ‘+’)) { list($username_email, $crap) = explode(‘+’, $user); $exists = email_exists($username_email . ‘@’ . $domain); … Read more

WordPress is executing URL in code when called via wp_mail()

Please try the following, I think having a return from the site_url() function could be creating a problem with the $confirm_url variable. That and you have an unescaped slash in your url. $site_url = site_url(); $confirm_url = $site_url. ‘\/verification?id=’ . $post_id . ‘&hash=” . $hash; // Send a verification e-mail to the user to confirm … Read more

wp_insert_user – how to send verification email before logging in

1. Insert user data into wp_users table. Create a page called “Activation” or similar to it and get the ID of that page. An activation email will be sent with the activation link to the user. function new_user($data) { // Separate Data $default_newuser = array( ‘user_pass’ => wp_hash_password( $data[‘user_pass’]), ‘user_login’ => $data[‘user_login’], ‘user_email’ => $data[‘user_email’], … Read more

How to set up User email verification after Signup?

You can use user_register hook add_action( ‘user_register’, ‘my_registration’, 10, 2 ); function my_registration( $user_id ) { // get user data $user_info = get_userdata($user_id); // create md5 code to verify later $code = md5(time()); // make it into a code to send it to user via email $string = array(‘id’=>$user_id, ‘code’=>$code); // create the activation code … Read more