Make WordPress Core

Ticket #1487: 1487.patch

File 1487.patch, 745 bytes (added by skippy, 19 years ago)
  • wp-register.php

     
    3030  if ( username_exists( $user_login ) )
    3131                $errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.');
    3232
     33        /* checking the email isn't already used by another user */
     34        $result = $wpdb->get_results("SELECT user_email FROM $wpdb->users WHERE user_email = '$user_email'");
     35        if (count($result) >= 1) {
     36                die (__('<strong>ERROR</strong>: This email address is already registered, please supply another.'));
     37        }
     38
    3339        if ( 0 == count($errors) ) {
    3440                $password = substr( md5( uniqid( microtime() ) ), 0, 7);
    3541