|
@@ 492-499 (lines=8) @@
|
| 489 |
|
} |
| 490 |
|
|
| 491 |
|
$signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_email = %s", $user_email) ); |
| 492 |
|
if ( $signup != null ) { |
| 493 |
|
$diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); |
| 494 |
|
// If registered more than two days ago, cancel registration and let this signup go through. |
| 495 |
|
if ( $diff > 2 * DAY_IN_SECONDS ) |
| 496 |
|
$wpdb->delete( $wpdb->signups, array( 'user_email' => $user_email ) ); |
| 497 |
|
else |
| 498 |
|
$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.')); |
| 499 |
|
} |
| 500 |
|
|
| 501 |
|
$result = array('user_name' => $user_name, 'orig_username' => $orig_username, 'user_email' => $user_email, 'errors' => $errors); |
| 502 |
|
|
|
@@ 637-644 (lines=8) @@
|
| 634 |
|
|
| 635 |
|
// Has someone already signed up for this domain? |
| 636 |
|
$signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) ); // TODO: Check email too? |
| 637 |
|
if ( ! empty($signup) ) { |
| 638 |
|
$diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); |
| 639 |
|
// If registered more than two days ago, cancel registration and let this signup go through. |
| 640 |
|
if ( $diff > 2 * DAY_IN_SECONDS ) |
| 641 |
|
$wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain , 'path' => $path ) ); |
| 642 |
|
else |
| 643 |
|
$errors->add('blogname', __('That site is currently reserved but may be available in a couple days.')); |
| 644 |
|
} |
| 645 |
|
|
| 646 |
|
$result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'user' => $user, 'errors' => $errors); |
| 647 |
|
|