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:
parent
e93d21f350
commit
1c6832ed77
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user