WordPress check email exists

function EmailExist($email,$id=0)
global $wpdb;
if($wpdb->get_row("SELECT user_email FROM ".$wpdb->prefix."users WHERE user_email = '"        .$email. "' AND ID <> '".$id."'", 'ARRAY_A'))
return true;
return false;

Share on Facebook0Tweet about this on Twitter0Share on Google+0Pin on Pinterest0Share on LinkedIn0Share on Reddit0
It's only fair to share...

Add Comment

Required fields are marked *. Your email address will not be published.