Making WordPress.org


Ignore:
Timestamp:
04/14/2021 03:56:53 AM (4 years ago)
Author:
dd32
Message:

Login: Have users agree to abide by the Privacy Policy (and later, ToS/CoC) when registering.

Enabled for all new signups.
See #5618.

File:
1 edited

Legend:

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

    r10893 r10899  
    8080 * Handles creating a "Pending" registration that will later be converted to an actual user  account.
    8181 */
    82 function wporg_login_create_pending_user( $user_login, $user_email, $user_mailinglist = false  ) {
     82function wporg_login_create_pending_user( $user_login, $user_email, $user_mailinglist = false, $tos_revision = 0  ) {
    8383    global $wpdb, $wp_hasher;
    8484
     
    9797    $profile_key        = wp_generate_password( 24, false, false );
    9898    $hashed_profile_key = time() . ':' . wp_hash_password( $profile_key );
     99
     100    $tos_meta_key = WPOrg_SSO::TOS_USER_META_KEY;
    99101
    100102    $pending_user = array(
     
    107109            'user_mailinglist' => $user_mailinglist,
    108110            'registration_ip'  => $_SERVER['REMOTE_ADDR'], // Spam & fraud control. Will be discarded after the account is created.
     111            $tos_meta_key      => $tos_revision,
    109112        ),
    110113        'scores' => array()
     
    289292    }
    290293
    291     foreach ( array( 'url', 'from', 'occ', 'interests' ) as $field ) {
     294    $tos_meta_key = WPOrg_SSO::TOS_USER_META_KEY;
     295
     296    foreach ( array( 'url', 'from', 'occ', 'interests', $tos_meta_key ) as $field ) {
    292297        if ( !empty( $pending_user['meta'][ $field ] ) ) {
    293298            $value = $pending_user['meta'][ $field ];
Note: See TracChangeset for help on using the changeset viewer.