#894 closed defect (wontfix)
bbPress does not check for duplicate email addresses
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Registration | Version: | 0.9.0.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Unlike WordPress's more robust registration functions bbPress still lacks the check for duplicate email addresses during registration.
I've created a plugin to workaround this (attached) but since it's not integrated it cannot show the custom error message on the page. (In fact that would be another fantastic plugin ability to have, custom error messages per $key so the user doesn't have to be crashed into a non-themed bb_die page.)
<?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>";}
?>
(if integrated into register.php, the above could probably be done in two lines of code)
Change History (2)
Note: See
TracTickets for help on using
tickets.

This is handled properly by BackPress in trunk.