<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[9146] sites/trunk: Login: Store user registrations in a custom table until they confirm their email address (at which time, we create the actual `wp_users` records).</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/9146">9146</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/9146","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>dd32</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-09-23 03:52:23 +0000 (Mon, 23 Sep 2019)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Login: Store user registrations in a custom table until they confirm their email address (at which time, we create the actual `wp_users` records).

This is to combat the significant number of unconfirmed accounts that are created, by separating them it's easier to purge them periodically, but also easier to add extra anti-spam checks as needed.

See <a href="http://meta.trac.wordpress.org/ticket/4739">#4739</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkcommonincludeswporgssowppluginphp">sites/trunk/common/includes/wporg-sso/wp-plugin.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginfunctionsregistrationphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginfunctionsrestapiphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-restapi.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginpartialsregisterprofilefieldsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/partials/register-profilefields.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginregisterphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/register.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginstylesheetslogincss">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/stylesheets/login.css</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginpendingcreatephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-create.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginpendingprofilephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-profile.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkcommonincludeswporgssowppluginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/common/includes/wporg-sso/wp-plugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/common/includes/wporg-sso/wp-plugin.php       2019-09-20 11:37:12 UTC (rev 9145)
+++ sites/trunk/common/includes/wporg-sso/wp-plugin.php 2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,8 +144,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        // Extend registration paths only when registration is open.
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( 'user' === get_site_option( 'registration', 'none' ) ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                // New "pending" registration flow.
+                               $this->valid_sso_paths['pending-profile']  = '/register/create-profile/(?P<profile_user>[^/]+)/(?P<profile_key>[^/]+)';
+                               $this->valid_sso_paths['pending-create']   = '/register/create/(?P<confirm_user>[^/]+)/(?P<confirm_key>[^/]+)';
+
+                               // Old "Create immediately" flow, kept as in-progress registrations need it.
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $this->valid_sso_paths['register-profile'] = '/register/profile/(?P<profile_user>[^/]+)/(?P<profile_nonce>[^/]+)';
</span><span class="cx" style="display: block; padding: 0 10px">                                $this->valid_sso_paths['register-confirm'] = '/register/confirm/(?P<confirm_user>[^/]+)/(?P<confirm_key>[^/]+)';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                               // Primary registration route.
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $this->valid_sso_paths['register']         = '/register';
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginfunctionsregistrationphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php        2019-09-20 11:37:12 UTC (rev 9145)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php  2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,7 +12,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $resp = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array( 'body' => $verify ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">         if ( is_wp_error( $resp ) || 200 != wp_remote_retrieve_response_code( $resp ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                return false;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,10 +22,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Handles registrations and redirects thereafter
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Handles creating a "Pending" registration that will later be converted to an actual user  account.
</ins><span class="cx" style="display: block; padding: 0 10px">  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wporg_login_create_user( $user_login, $user_email, $user_mailinglist = false ) {
-       global $wpdb;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wporg_login_create_pending_user( $user_login, $user_email, $user_mailinglist = false  ) {
+       global $wpdb, $wp_hasher;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        // Allow for w.org plugins to block registrations based on spam checks, etc.
</span><span class="cx" style="display: block; padding: 0 10px">        if ( null !== ( $pre_register_error = apply_filters( 'wporg_login_pre_registration', null, $user_login, $user_email, $user_mailinglist ) ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,24 +35,28 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_die( __( 'Registration Blocked. Please stop.', 'wporg' ) );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $user_id = wpmu_create_user( wp_slash( $user_login ), wp_generate_password(), wp_slash( $user_email ) );
-       if ( ! $user_id ) {
-               wp_die( __( 'Error! Something went wrong with your registration. Try again?', 'wporg' ) );
-       }
-
-       // Insert a hashed activation key
</del><span class="cx" style="display: block; padding: 0 10px">         $activation_key = wp_generate_password( 24, false, false );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( empty( $wp_hasher ) ) {
-               require_once ABSPATH . WPINC . '/class-phpass.php';
-               $wp_hasher = new PasswordHash( 8, true );
-       }
-       $hashed_activation_key = time() . ':' . $wp_hasher->HashPassword( $activation_key );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $profile_key    = wp_generate_password( 24, false, false );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed_activation_key ), array( 'ID' => $user_id ) );
-       clean_user_cache( $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $hashed_activation_key = time() . ':' . wp_hash_password( $activation_key );
+       $hashed_profile_key    = time() . ':' . wp_hash_password( $profile_key );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( $user_mailinglist ) {
-               update_user_meta( $user_id, 'notify_list', 'true' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $pending_user = array(
+               'user_login' => $user_login,
+               'user_email' => $user_email,
+               'user_registered' => gmdate('Y-m-d  H:i:s'),
+               'user_activation_key' => $hashed_activation_key,
+               'user_profile_key' => $hashed_profile_key,
+               'meta' => array(
+                       'user_mailinglist' => $user_mailinglist,
+                       'registration_ip'  => $_SERVER['REMOTE_ADDR'], // Spam & fraud control. Will be discarded after the account is created.
+               ),
+               'scores' => array()
+       );
+
+       $inserted = wporg_update_pending_user( $pending_user );
+       if ( ! $inserted ) {
+               wp_die( __( 'Error! Something went wrong with your registration. Try again?', 'wporg' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $body  = sprintf( __( 'Hi %s,', 'wporg' ), $user_login ) . "\n\n";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,7 +64,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        $body .= "\n";
</span><span class="cx" style="display: block; padding: 0 10px">        $body .= sprintf( __( 'Your username is: %s', 'wporg' ), $user_login ) . "\n";
</span><span class="cx" style="display: block; padding: 0 10px">        $body .= __( 'You can create a password at the following URL:', 'wporg' ) . "\n";
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $body .= home_url( "/register/confirm/{$user_login}/{$activation_key}/" );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $body .= home_url( "/register/create/{$user_login}/{$activation_key}/" );
</ins><span class="cx" style="display: block; padding: 0 10px">         $body .= "\n\n";
</span><span class="cx" style="display: block; padding: 0 10px">        $body .= __( '-- The WordPress.org Team', 'wporg' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,17 +77,126 @@
</span><span class="cx" style="display: block; padding: 0 10px">                )
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        wp_set_current_user( $user_id );
-       $nonce = wp_create_nonce( 'login-register-profile-edit' );
-       wp_set_current_user( 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url = home_url( sprintf(
+               '/register/create-profile/%s/%s/',
+               $user_login,
+               $profile_key
+       ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        wp_safe_redirect( '/register/profile/' . $user_login . '/' . $nonce );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_safe_redirect( $url );
</ins><span class="cx" style="display: block; padding: 0 10px">         die();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wporg_login_save_profile_fields() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Fetches a pending user record from the database by username or Email.
+ */
+function wporg_get_pending_user( $login_or_email ) {
+       global $wpdb;
+
+       $pending_user = $wpdb->get_row( $wpdb->prepare(
+               "SELECT * FROM `{$wpdb->base_prefix}user_pending_registrations` WHERE ( `user_login` = %s OR `user_email` = %s ) LIMIT 1",
+               $login_or_email,
+               $login_or_email
+       ), ARRAY_A );
+
+       if ( ! $pending_user ) {
+               return false;
+       }
+
+       $pending_user['meta']   = json_decode( $pending_user['meta'], true );
+       $pending_user['scores'] = json_decode( $pending_user['scores'], true );
+
+       return $pending_user;
+}
+
+/**
+ * Update the pending user record, similar to `wp_update_user()` but for the not-yet-created user record.
+ */
+function wporg_update_pending_user( $pending_user ) {
+       global $wpdb;
+       $pending_user['meta']   = json_encode( $pending_user['meta'] );
+       $pending_user['scores'] = json_encode( $pending_user['scores'] );
+
+       if ( empty( $pending_user['pending_id'] ) ) {
+               unset( $pending_user['pending_id'] );
+               return $wpdb->insert(
+                       "{$wpdb->base_prefix}user_pending_registrations",
+                       $pending_user
+               );
+       } else {
+               return $wpdb->update(
+                       "{$wpdb->base_prefix}user_pending_registrations",
+                       $pending_user,
+                       array( 'pending_id' => $pending_user['pending_id'] )
+               );
+       }
+
+}
+
+/**
+ * Create a user record from a pending record. 
+ */
+function wporg_login_create_user_from_pending( $pending_user, $password = false ) {
+       global $wpdb;
+
+       // Insert user, no password tho.
+       $user_login = $pending_user['user_login'];
+       $user_email = $pending_user['user_email'];
+       $user_mailinglist = !empty( $pending_user['meta']['user_mailinglist'] ) && $pending_user['meta']['user_mailinglist'];
+
+       if ( ! $password ) {
+               $password = wp_generate_password();
+       }
+
+       $user_id = wpmu_create_user(
+               wp_slash( $user_login ),
+               $password,
+               wp_slash( $user_email )
+       );
+       if ( ! $user_id ) {
+               wp_die( __( 'Error! Something went wrong with your registration. Try again?', 'wporg' ) );
+       }
+
+       // Update the registration date to the earlier one.
+       wp_update_user( array(
+               'ID' => $user_id,
+               'user_registered' => $pending_user['user_registered']
+       ) );
+
+       // Update the pending record with the new details.
+       $pending_user['created'] = 1;
+       $pending_user['created_date'] = gmdate( 'Y-m-d H:i:s' );
+       $pending_user['meta']['confirmed_ip'] = $_SERVER['REMOTE_ADDR']; // Spam/Fraud purposes, will be deleted once not needed.
+       wporg_update_pending_user( $pending_user );
+
+       if ( $user_mailinglist ) {
+               update_user_meta( $user_id, 'notify_list', 'true' );
+       }
+
+       foreach ( array( 'url', 'from', 'occ', 'interests' ) as $field ) {
+               if ( !empty( $pending_user['meta'][ $field ] ) ) {
+                       $value = $pending_user['meta'][ $field ];
+                       if ( 'url' == $field ) {
+                               wp_update_user( array( 'ID' => $user_id, 'user_url' => $value ) );
+                       } else {
+                               if ( $value ) {
+                                       update_user_meta( $user_id, $field, $value );
+                               } else {
+                                       delete_user_meta( $user_id, $field );
+                               }
+                       }
+               }
+       }
+
+       return get_user_by( 'id', $user_id );
+}
+
+/**
+ * Save the user profile fields, potentially prior to user creation and prior to email confirmation.
+ */
+function wporg_login_save_profile_fields( $pending_user = false ) {
</ins><span class="cx" style="display: block; padding: 0 10px">         if ( ! $_POST || empty( $_POST['user_fields'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                return;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         return false;
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px">        $fields = array( 'url', 'from', 'occ', 'interests' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,13 +204,31 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( isset( $_POST['user_fields'][ $field ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $value = sanitize_text_field( wp_unslash( $_POST['user_fields'][ $field ] ) );
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( 'url' == $field ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                wp_update_user( array(
-                                       'ID' => get_current_user_id(),
-                                       'user_url' => esc_url_raw( $value ),
-                               ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( $pending_user ) {
+                                       $pending_user['meta'][ $field ] = esc_url_raw( $value );
+                               } else {
+                                       wp_update_user( array(
+                                               'ID' => get_current_user_id(),
+                                               'user_url' => esc_url_raw( $value ),
+                                       ) );
+                               }
</ins><span class="cx" style="display: block; padding: 0 10px">                         } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                update_user_meta( get_current_user_id(), $field, $value );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( $pending_user ) {
+                                       $pending_user['meta'][ $field ] = $value;
+                               } else {
+                                       if ( $value ) {
+                                               update_user_meta( get_current_user_id(), $field, $value );
+                                       } else {
+                                               delete_user_meta( get_current_user_id(), $field );
+                                       }
+                               }
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+       if ( $pending_user ) {
+               wporg_update_pending_user( $pending_user );
+       }
+
+       return true;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginfunctionsrestapiphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-restapi.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-restapi.php     2019-09-20 11:37:12 UTC (rev 9145)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-restapi.php       2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,6 +35,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ];
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        // Check we don't have a pending registration for that username.
+       if ( $pending = wporg_get_pending_user( $login ) ) {
+               return [
+                       'available' => false,
+                       'error' => __( 'That username is already in use.', 'wporg' ) . '<br>' . __( 'The registration is still pending, please check your email for the confirmation link.', 'wporg' ),
+                       'avatar' => get_avatar( $pending->user_email, 64 ),
+               ];
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         // Perform general validations.
</span><span class="cx" style="display: block; padding: 0 10px">        $validate_signup_error = $validate_signup['errors']->get_error_message( 'user_name' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,6 +69,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ];
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        // Check we don't have a pending registration for that email.
+       if ( $pending = wporg_get_pending_user( $email ) ) {
+               return [
+                       'available' => false,
+                       'error' => __( 'That email address already has an account.', 'wporg' ) . '<br>' . __( 'The registration is still pending, please check your email for the confirmation link.', 'wporg' ),
+                       'avatar' => get_avatar( $email, 64 ),
+               ];
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         $validate_signup = wpmu_validate_user_signup( '', $email );
</span><span class="cx" style="display: block; padding: 0 10px">        $validate_signup_error = $validate_signup['errors']->get_error_message( 'user_email' );
</span><span class="cx" style="display: block; padding: 0 10px">        if ( $validate_signup_error ) {
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php     2019-09-20 11:37:12 UTC (rev 9145)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php       2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -192,6 +192,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'insert_user_meta', 'wporg_login_limit_user_meta', 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Remove the default contact methods.
+ * This prevents the user meta being created unless they edit their profiles.
+ */
+add_filter( 'user_contactmethods', '__return_empty_array' );
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px">  * Retreives all avaiable locales with their native names.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * @return array Locales with their native names.
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginpartialsregisterprofilefieldsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/partials/register-profilefields.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/partials/register-profilefields.php       2019-09-20 11:37:12 UTC (rev 9145)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/partials/register-profilefields.php 2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,33 +7,35 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @package wporg-login
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$user = get_user_by( 'id', get_current_user_id() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( empty( $fields ) ) {
+       $user = get_user_by( 'id', get_current_user_id() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$fields = [
-       'url'       => $user->user_url ?: '',
-       'from'      => $user->from ?: '',
-       'occ'       => $user->occ ?: '',
-       'interests' => $user->interests ?: '',
-];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $fields = [
+               'url'       => $user->user_url ?: '',
+               'from'      => $user->from ?: '',
+               'occ'       => $user->occ ?: '',
+               'interests' => $user->interests ?: '',
+       ];
+}
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="login-website">
</span><span class="cx" style="display: block; padding: 0 10px">        <label for="user_website"><?php _e( 'Website', 'wporg' ); ?></label>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <input type="text" name="user_fields[url]" id="user_url" class="input" value="<?php echo esc_attr( $fields['url'] ); ?>" size="20" placeholder="https://" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <input type="text" name="user_fields[url]" id="user_url" class="input" value="<?php echo esc_attr( $fields['url'] ?? '' ); ?>" size="20" placeholder="https://" />
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="login-location">
</span><span class="cx" style="display: block; padding: 0 10px">        <label for="user_location"><?php _e( 'Location', 'wporg' ); ?></label>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <input type="text" name="user_fields[from]" id="user_location" class="input" value="<?php echo esc_attr( $fields['from'] ); ?>" size="20" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <input type="text" name="user_fields[from]" id="user_location" class="input" value="<?php echo esc_attr( $fields['from'] ?? '' ); ?>" size="20" />
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="login-occupation">
</span><span class="cx" style="display: block; padding: 0 10px">        <label for="user_occupation"><?php _e( 'Occupation', 'wporg' ); ?></label>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <input type="text" name="user_fields[occ]" id="user_occupation" class="input" value="<?php echo esc_attr( $fields['occ'] ); ?>" size="20" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <input type="text" name="user_fields[occ]" id="user_occupation" class="input" value="<?php echo esc_attr( $fields['occ'] ?? '' ); ?>" size="20" />
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="login-interests">
</span><span class="cx" style="display: block; padding: 0 10px">        <label for="user_interests"><?php _e( 'Interests', 'wporg' ); ?></label>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <input type="text" name="user_fields[interests]" id="user_interests" class="input" value="<?php echo esc_attr( $fields['interests'] ); ?>" size="20" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <input type="text" name="user_fields[interests]" id="user_interests" class="input" value="<?php echo esc_attr( $fields['interests'] ?? '' ); ?>" size="20" />
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginpendingcreatephpfromrev9139sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginregisterconfirmphp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-create.php (from rev 9139, sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/register-confirm.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-create.php                                (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-create.php  2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,104 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * The post-email-confirm Template
+ *
+ * @package wporg-login
+ */
+
+$activation_user = WP_WPOrg_SSO::$matched_route_params['confirm_user'] ?? false;
+$activation_key  = WP_WPOrg_SSO::$matched_route_params['confirm_key']  ?? false;
+
+$pending_user = wporg_get_pending_user( $activation_user );
+if ( ! $pending_user ) {
+       // TODO: add a handler for "Link is expired". The pending user record has been purged.
+       // See Line 33 below for the second case where this is needed.
+}
+
+$can_access = false;
+if ( $pending_user && $pending_user['user_activation_key'] && ! $pending_user['created'] ) {
+       $expiration_duration = WEEK_IN_SECONDS; // Time that the user has to confirm the account.
+
+       list( $user_request_time, $hashed_activation_key ) = explode( ':', $pending_user['user_activation_key'], 2 );
+       $expiration_time                                   = $user_request_time + $expiration_duration;
+
+       $hash_is_correct = wp_check_password( $activation_key, $hashed_activation_key );
+
+       if ( $hash_is_correct && time() < $expiration_time ) {
+               $can_access = true;
+       } elseif ( $hash_is_correct ) {
+               // TODO: Add a handler for "Link is expired".
+               // For now, ignore the expiry date on the email links.
+               // This URL is invalidated once the user is created anyway.
+               $can_access = true; 
+       }
+} elseif ( $pending_user && $pending_user['created'] ) {
+       wp_safe_redirect( 'https://wordpress.org/support/' );
+       die();
+}
+
+if ( ! $can_access ) {
+       wp_safe_redirect( "/" );
+       die();
+}
+
+if ( isset( $_POST['user_pass'] ) ) {
+       $user_pass = wp_unslash( $_POST['user_pass'] );
+
+       if ( $pending_user && ! $pending_user['created'] ) {
+               $user = wporg_login_create_user_from_pending( $pending_user, $user_pass );
+               if ( $user ) {
+                       wp_set_current_user( $user->ID );
+                       wp_set_auth_cookie( $user->ID, true );
+               }
+       }
+
+       wporg_login_save_profile_fields();
+
+       wp_safe_redirect( 'https://wordpress.org/support/' );
+       die();
+}
+
+wp_enqueue_script( 'zxcvbn' );
+wp_enqueue_script( 'user-profile' );
+wp_enqueue_script( 'wporg-registration' );
+
+get_header();
+?>
+
+<p class="intro">
+<?php _e( 'Set your password and complete your WordPress.org Profile information.', 'wporg' ); ?>
+</p>
+
+<form name="registerform" id="registerform" action="" method="post">
+
+               <div class="user-pass1-wrap">
+               <p>
+                       <label for="pass1"><?php _e( 'Password', 'wporg' ); ?></label>
+               </p>
+
+               <div class="wp-pwd">
+                       <span class="password-input-wrapper">
+                               <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="user_pass" id="pass1" class="input" size="20" value="" autocomplete="off" aria-describedby="pass-strength-result" />
+                       </span>
+                       <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator', 'wporg' ); ?></div>
+               </div>
+       </div>
+
+<!--        <p class="description indicator-hint"><?php _e( 'Hint: The password should be at least twelve characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ &amp; ).', 'wporg' ); ?></p> -->
+
+       <?php
+               $fields = &$pending_user['meta'];
+               include __DIR__ . '/partials/register-profilefields.php';
+       ?>
+
+       <p class="login-submit">
+               <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="<?php esc_attr_e( 'Create Account', 'wporg' ); ?>" />
+       </p>
+
+</form>
+
+<p id="nav">
+       <a href="https://wordpress.org/"><?php _e( 'WordPress.org', 'wporg' ); ?></a>
+</p>
+
+<?php get_footer();
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginpendingprofilephpfromrev9139sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginregisterprofilephp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-profile.php (from rev 9139, sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/register-profile.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-profile.php                               (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-profile.php 2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,74 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * The post-pending-email-confirm profile-fields Template
+ *
+ * @package wporg-login
+ */
+
+$profile_user = WP_WPOrg_SSO::$matched_route_params['profile_user'] ?? false;
+$profile_key  = WP_WPOrg_SSO::$matched_route_params['profile_key']  ?? false;
+
+$pending_user = wporg_get_pending_user( $profile_user );
+
+$can_access = false;
+if ( $pending_user && $pending_user['user_profile_key'] ) {
+       $expiration_duration = DAY_IN_SECONDS; // The profile-edit screen is short lived.
+
+       list( $user_request_time, $hashed_profile_key ) = explode( ':', $pending_user['user_profile_key'], 2 );
+       $expiration_time                                = $user_request_time + $expiration_duration;
+
+       $hash_is_correct = wp_check_password( $profile_key, $hashed_profile_key );
+
+       if ( $hash_is_correct && time() < $expiration_time ) {
+               $can_access = true;
+       }
+}
+
+if ( $can_access && $pending_user['created']  ) {
+       wp_safe_redirect( 'https://wordpress.org/support/' );
+       die();
+} elseif ( ! $can_access ) {
+       wp_safe_redirect( '/' );
+       die();
+}
+
+if ( wporg_login_save_profile_fields( $pending_user ) ) {
+       // re-fetch the user, it's probably changed.
+       $pending_user = wporg_get_pending_user( $profile_user );
+}
+wp_enqueue_script( 'wporg-registration' );
+
+get_header();
+?>
+<div class="message info">
+       <p><?php
+               printf(
+                       /* translators: %s Email address */
+                       __( 'Please check your email %s for a confirmation link to set your password.', 'wporg' ),
+                       '<code>' . esc_html( wp_get_current_user()->user_email ) . '</code>'
+               );
+       ?></p>
+</div>
+
+<p class="intro">
+<?php _e( 'Complete your WordPress.org Profile information.', 'wporg' ); ?>
+</p>
+
+<form name="registerform" id="registerform" action="" method="post">
+
+       <?php
+               $fields = &$pending_user['meta'];
+               include __DIR__ . '/partials/register-profilefields.php';
+       ?>
+
+       <p class="login-submit">
+               <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="<?php esc_attr_e( 'Save Profile Information', 'wporg' ); ?>" />
+       </p>
+
+</form>
+
+<p id="nav">
+       <a href="https://wordpress.org/"><?php _e( 'WordPress.org', 'wporg' ); ?></a>
+</p>
+
+<?php get_footer(); ?>
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginregisterphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/register.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/register.php      2019-09-20 11:37:12 UTC (rev 9145)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/register.php        2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +27,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! wporg_login_check_recapcha_status() ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $error_recapcha_status = true;
</span><span class="cx" style="display: block; padding: 0 10px">                } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        wporg_login_create_user( $user_login, $user_email, $user_mailinglist );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 wporg_login_create_pending_user( $user_login, $user_email, $user_mailinglist );
</ins><span class="cx" style="display: block; padding: 0 10px">                         die();
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgloginstylesheetslogincss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/stylesheets/login.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/stylesheets/login.css     2019-09-20 11:37:12 UTC (rev 9145)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/stylesheets/login.css       2019-09-23 03:52:23 UTC (rev 9146)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,7 +26,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* Don't use Flex alignments for the registration pages, doesn't play nice with content that exceeds the window height  */
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register,
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-confirm {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-confirm,
+body.route-pending-profile,
+body.route-pending-create {
</ins><span class="cx" style="display: block; padding: 0 10px">         display: block;
</span><span class="cx" style="display: block; padding: 0 10px">        padding-top: 72px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -332,13 +334,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register input.input,
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile input.input,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-confirm input.input {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-confirm input.input,
+body.route-pending-profile input.input,
+body.route-pending-create input.input {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin-bottom: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register #login form p,
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile #login form p,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-confirm #login form p {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-confirm #login form p,
+body.route-pending-profile #login form p,
+body.route-pending-create #login form p {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin-bottom: 16px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -369,7 +375,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register #login .message,
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile #login .message,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-confirm #login .message {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-confirm #login .message,
+body.route-pending-profile #login .message,
+body.route-pending-create #login .message {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin-left: -24px;
</span><span class="cx" style="display: block; padding: 0 10px">        padding-left: 24px;
</span><span class="cx" style="display: block; padding: 0 10px">        padding-right: 24px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -378,13 +386,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register #login .message p,
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile #login .message p,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-confirm #login .message p {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-confirm #login .message p,
+body.route-pending-profile #login .message p,
+body.route-pending-create #login .message p {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register #login .message.with-avatar p,
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile #login .message.with-avatar p,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-confirm #login .message.with-avatar p {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-confirm #login .message.with-avatar p,
+body.route-pending-profile #login .message.with-avatar p,
+body.route-pending-create #login .message.with-avatar p {
</ins><span class="cx" style="display: block; padding: 0 10px">         display: -webkit-box;
</span><span class="cx" style="display: block; padding: 0 10px">        display: -ms-flexbox;
</span><span class="cx" style="display: block; padding: 0 10px">        display: flex;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -395,7 +407,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register #login .message.error,
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile #login .message.error,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-confirm #login .message.error {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-confirm #login .message.error,
+body.route-pending-profile #login .message.error,
+body.route-pending-create #login .message.error {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin-bottom: 30px !important;
</span><span class="cx" style="display: block; padding: 0 10px">        color: #23282d;
</span><span class="cx" style="display: block; padding: 0 10px">        background: #fbfbfb;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -410,7 +424,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.rtl.route-register #login .message.error,
</span><span class="cx" style="display: block; padding: 0 10px"> body.rtl.route-register-profile #login .message.error,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.rtl.route-register-confirm #login .message.error {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.rtl.route-register-confirm #login .message.error,
+body.rtl.route-pending-profile #login .message.error,
+body.rtl.route-pending-create #login .message.error {
</ins><span class="cx" style="display: block; padding: 0 10px">         border-right-color: #dc3232;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -426,13 +442,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">        margin-left: 1em;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-profile #login .message.info {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-profile #login .message.info,
+body.route-pending-profile #login .message.info {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin-top: -24px;
</span><span class="cx" style="display: block; padding: 0 10px">        width: 350px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> body.route-register-profile #login .message.info,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.route-register-profile p.intro {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.route-register-profile p.intro,
+body.route-pending-profile #login .message.info,
+body.route-pending-profile p.intro {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin-bottom: 1em !important;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>