From 61e0dc01225c633620df24feca7faa14540dd207 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 5 Oct 2012 13:11:16 +0000 Subject: [PATCH] Use 2 * DAY_IN_SECONDS rather than 172800. props pavelevap. fixes #20987. git-svn-id: http://core.svn.wordpress.org/trunk@22121 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 35f59e63a4..3f522e9de0 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -486,7 +486,7 @@ function wpmu_validate_user_signup($user_name, $user_email) { $now = current_time( 'timestamp', true ); $diff = $now - $registered_at; // If registered more than two days ago, cancel registration and let this signup go through. - if ( $diff > 172800 ) + if ( $diff > 2 * DAY_IN_SECONDS ) $wpdb->delete( $wpdb->signups, array( 'user_login' => $user_name ) ); else $errors->add('user_name', __('That username is currently reserved but may be available in a couple of days.')); @@ -499,7 +499,7 @@ function wpmu_validate_user_signup($user_name, $user_email) { if ( $signup != null ) { $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); // If registered more than two days ago, cancel registration and let this signup go through. - if ( $diff > 172800 ) + if ( $diff > 2 * DAY_IN_SECONDS ) $wpdb->delete( $wpdb->signups, array( 'user_email' => $user_email ) ); else $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.')); @@ -602,7 +602,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') { if ( ! empty($signup) ) { $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); // If registered more than two days ago, cancel registration and let this signup go through. - if ( $diff > 172800 ) + if ( $diff > 2 * DAY_IN_SECONDS ) $wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain , 'path' => $path ) ); else $errors->add('blogname', __('That site is currently reserved but may be available in a couple days.'));