Making WordPress.org


Ignore:
Timestamp:
04/14/2021 04:49:37 AM (3 years ago)
Author:
dd32
Message:

Login: Store Akismet result for each signup, and expose it within the Admin UI.

File:
1 edited

Legend:

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

    r10900 r10901  
    3636        if ( ! wporg_login_check_recapcha_status( 'register' ) ) {
    3737            $error_recapcha_status = true;
    38         } elseif ( 'OK' !== wporg_login_check_akismet( $user_login, $user_email ) ) {
    39             $error_akismet = true;
    4038        } else {
    41             wporg_login_create_pending_user( $user_login, $user_email, $user_mailinglist, $terms_of_service );
    42             die();
     39            $akismet = wporg_login_check_akismet( $user_login, $user_email );
     40
     41            $tos_meta_key = WPOrg_SSO::TOS_USER_META_KEY;
     42            $meta = [
     43                'user_mailinglist' => $user_mailinglist,
     44                'akismet_result'   => $akismet,
     45                $tos_meta_key      => $terms_of_service,
     46            ];
     47
     48            if ( 'spam' === $akismet ) {
     49                $error_akismet = true;
     50            } else {
     51                wporg_login_create_pending_user( $user_login, $user_email, $meta );
     52                die();
     53            }
    4354        }
    4455    }
Note: See TracChangeset for help on using the changeset viewer.