~canonical-sysadmins/wordpress/5.1.3

« back to all changes in this revision

Viewing changes to wp-includes/user.php

  • Committer: Barry Price
  • Date: 2018-07-06 10:06:19 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: barry.price@canonical.com-20180706100619-g8mbdb7wvr0aamb5
Merge WP4.9.7 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
2650
2650
                        return;
2651
2651
                }
2652
2652
 
2653
 
                $hash           = md5( $_POST['email'] . time() . mt_rand() );
 
2653
                $hash           = md5( $_POST['email'] . time() . wp_rand() );
2654
2654
                $new_user_email = array(
2655
2655
                        'hash'     => $hash,
2656
2656
                        'newemail' => $_POST['email'],
3260
3260
                'siteurl'     => network_home_url(),
3261
3261
        );
3262
3262
 
3263
 
        /* translators: Do not translate DESCRIPTION, CONFIRM_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
 
3263
        /* translators: Do not translate DESCRIPTION, CONFIRM_URL, SITENAME, SITEURL: those are placeholders. */
3264
3264
        $email_text = __(
3265
3265
                'Howdy,
3266
3266
 
3274
3274
You can safely ignore and delete this email if you do not want to
3275
3275
take this action.
3276
3276
 
3277
 
This email has been sent to ###EMAIL###.
3278
 
 
3279
3277
Regards,
3280
3278
All at ###SITENAME###
3281
3279
###SITEURL###'
3288
3286
         *
3289
3287
         * ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
3290
3288
         * ###CONFIRM_URL### The link to click on to confirm the account action.
3291
 
         * ###EMAIL###       The email we are sending to.
3292
3289
         * ###SITENAME###    The name of the site.
3293
3290
         * ###SITEURL###     The URL to the site.
3294
3291
         *
3431
3428
        }
3432
3429
 
3433
3430
        if ( ! $expiration_time || time() > $expiration_time ) {
3434
 
                $return = new WP_Error( 'expired_key', __( 'The confirmation email has expired.' ) );
 
3431
                return new WP_Error( 'expired_key', __( 'The confirmation email has expired.' ) );
3435
3432
        }
3436
3433
 
3437
3434
        return true;