@@ 491-498 (lines=8) @@ | ||
488 | } |
|
489 | ||
490 | $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_email = %s", $user_email) ); |
|
491 | if ( $signup != null ) { |
|
492 | $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); |
|
493 | // If registered more than two days ago, cancel registration and let this signup go through. |
|
494 | if ( $diff > 2 * DAY_IN_SECONDS ) |
|
495 | $wpdb->delete( $wpdb->signups, array( 'user_email' => $user_email ) ); |
|
496 | else |
|
497 | $errors->add('user_email', __('That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing.')); |
|
498 | } |
|
499 | ||
500 | $result = array('user_name' => $user_name, 'orig_username' => $orig_username, 'user_email' => $user_email, 'errors' => $errors); |
|
501 | ||
@@ 625-632 (lines=8) @@ | ||
622 | ||
623 | // Has someone already signed up for this domain? |
|
624 | $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) ); // TODO: Check email too? |
|
625 | if ( ! empty($signup) ) { |
|
626 | $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); |
|
627 | // If registered more than two days ago, cancel registration and let this signup go through. |
|
628 | if ( $diff > 2 * DAY_IN_SECONDS ) |
|
629 | $wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain , 'path' => $path ) ); |
|
630 | else |
|
631 | $errors->add('blogname', __('That site is currently reserved but may be available in a couple days.')); |
|
632 | } |
|
633 | ||
634 | $result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'user' => $user, 'errors' => $errors); |
|
635 |