Changeset 3507
- Timestamp:
- 02/09/06 08:11:26 (3 years ago)
- Files:
-
- trunk/wp-includes/registration-functions.php (modified) (1 diff)
- trunk/wp-register.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/registration-functions.php
r3481 r3507 9 9 10 10 return null; 11 } 12 13 function email_exists( $email ) { 14 global $wpdb; 15 $email = addslashes( $email ); 16 $email_exists = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE user_email = '$email'"); 17 if ( $email_exists) 18 return true; 11 19 } 12 20 trunk/wp-register.php
r3481 r3507 34 34 $errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.'); 35 35 36 /* checking the email isn't already used by another user */ 37 $email_exists = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE user_email = '$user_email'"); 38 if ( $email_exists) 39 die (__('<strong>ERROR</strong>: This email address is already registered, please supply another.')); 36 if ( email_exists( $user_email ) ) 37 $errors['user_email'] = __('<strong>ERROR</strong>: This email is already registered, please choose another one.'); 40 38 41 39 if ( 0 == count($errors) ) { … … 50 48 51 49 if ( 0 == count($errors) ) { 52 50 53 51 ?> 54 52 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> … … 102 100 <?php if ( isset($errors) ) : ?> 103 101 <div class="error"> 104 < ul>102 <p> 105 103 <?php 106 foreach($errors as $error) echo " <li>$error</li>";104 foreach($errors as $error) echo "$error<br />"; 107 105 ?> 108 </ ul>106 </p> 109 107 </div> 110 108 <?php endif; ?>
