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

git-svn-id: http://svn.automattic.com/wordpress/trunk@3121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-11-17 01:18:16 +00:00
parent 1fb7241355
commit 06c09b9e74
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,11 @@ case 'register':
if ( username_exists( $user_login ) )
$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) ) {
$password = substr( md5( uniqid( microtime() ) ), 0, 7);