Don't let people register dupe emails, fixes #1487

git-svn-id: https://develop.svn.wordpress.org/trunk@3121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-11-17 01:18:16 +00:00
parent e93d21f350
commit 1c6832ed77
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,11 @@ case 'register':
if ( username_exists( $user_login ) ) if ( username_exists( $user_login ) )
$errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.'); $errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.');
/* checking the email isn't already used by another user */
$email_exists = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE user_email = '$user_email'");
if ( $email_exists)
die (__('<strong>ERROR</strong>: This email address is already registered, please supply another.'));
if ( 0 == count($errors) ) { if ( 0 == count($errors) ) {
$password = substr( md5( uniqid( microtime() ) ), 0, 7); $password = substr( md5( uniqid( microtime() ) ), 0, 7);