WordPress.org

Make WordPress Core

Ticket #20987: more_constants.patch

File more_constants.patch, 1.7 KB (added by pavelevap, 3 years ago)
  • wp-includes/ms-functions.php

     
    486486                $now = current_time( 'timestamp', true ); 
    487487                $diff = $now - $registered_at; 
    488488                // If registered more than two days ago, cancel registration and let this signup go through. 
    489                 if ( $diff > 172800 ) 
     489                if ( $diff > 2 * DAY_IN_SECONDS ) 
    490490                        $wpdb->delete( $wpdb->signups, array( 'user_login' => $user_name ) ); 
    491491                else 
    492492                        $errors->add('user_name', __('That username is currently reserved but may be available in a couple of days.')); 
     
    499499        if ( $signup != null ) { 
    500500                $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); 
    501501                // If registered more than two days ago, cancel registration and let this signup go through. 
    502                 if ( $diff > 172800 ) 
     502                if ( $diff > 2 * DAY_IN_SECONDS ) 
    503503                        $wpdb->delete( $wpdb->signups, array( 'user_email' => $user_email ) ); 
    504504                else 
    505505                        $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.')); 
     
    602602        if ( ! empty($signup) ) { 
    603603                $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); 
    604604                // If registered more than two days ago, cancel registration and let this signup go through. 
    605                 if ( $diff > 172800 ) 
     605                if ( $diff > 2 * DAY_IN_SECONDS ) 
    606606                        $wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain , 'path' => $path ) ); 
    607607                else 
    608608                        $errors->add('blogname', __('That site is currently reserved but may be available in a couple days.'));