Making WordPress.org

Changeset 13363


Ignore:
Timestamp:
03/20/2024 12:20:57 AM (2 years ago)
Author:
dd32
Message:

Registration: Extend the length of time pending registrations are kept.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php

    r12758 r13363  
    411411function wporg_login_purge_pending_registrations() {
    412412        global $wpdb;
    413         $two_weeks_ago_s = time() - 14 * DAY_IN_SECONDS;
    414         $two_weeks_ago   = gmdate( 'Y-m-d H:i:s', $two_weeks_ago_s );
     413        $timeout_s = time() - 8 * WEEK_IN_SECONDS;
     414        $timeout   = gmdate( 'Y-m-d H:i:s', $timeout_s );
    415415
    416416        $wpdb->query( $wpdb->prepare(
    417417                "DELETE FROM `{$wpdb->base_prefix}user_pending_registrations`
    418418                WHERE `user_registered` <= %s AND LEFT( `user_activation_key`, 10 ) <= %d",
    419                 $two_weeks_ago,
    420                 $two_weeks_ago_s
     419                $timeout,
     420                $timeout_s
    421421        ) );
    422422}
Note: See TracChangeset for help on using the changeset viewer.