[Bb-trac] [bbPress] #894: bbPress does not check for duplicate email addresses

bbPress bb-trac at lists.bbpress.org
Wed Jul 16 23:55:58 GMT 2008


#894: bbPress does not check for duplicate email addresses
--------------------------+-------------------------------------------------
 Reporter:  _ck_          |       Owner:                    
     Type:  defect        |      Status:  new               
 Priority:  normal        |   Milestone:  1.0-beta & XML-RPC
Component:  Registration  |     Version:                    
 Severity:  normal        |    Keywords:                    
--------------------------+-------------------------------------------------
 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)

-- 
Ticket URL: <http://trac.bbpress.org/ticket/894>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list