Re: Registering with another users email ???
Yes, this is why I always recommend to people when integrating with WordPress that they redirect all login and registration links to the wordpress side. It’s had years of development in that area.
In any case, here is a simple plugin to prevent duplicate email addresses. Unfortunately bbPress has no way to place custom error messages on the page without template hacking but this should do:
<?php
/*
Plugin Name: no duplicate email addresses
Author: _ck_
*/
if ($_POST && bb_get_location()=="register-page") {add_filter('bb_verify_email','no_duplicate_email');}
function no_duplicate_email($email) {
if ($email) {global $bbdb; if (!$bbdb->get_row($bbdb->prepare("SELECT * FROM $bbdb->users WHERE user_email = %s", $email))) {return $email;}
else {add_action('bb_foot','no_duplicate_email_alert'); return false;}}
}
function no_duplicate_email_alert() {echo "<scr"."ipt>alert('".__("email address already registered")."');</script>";}
?>
(bbPress 0.9 or higher required)