Make WordPress Core


Ignore:
Timestamp:
08/13/2019 05:39:06 PM (6 years ago)
Author:
azaozz
Message:

Admin email verification:

  • Add the admin_email_lifespan option when installing. Fixes a bug where the verification screen is shown right after installation.
  • Reset the same option when upgrading and the user doing the DB upgrade is not an admin. This will ensure the email verification is shown next time an admin logs in.
  • Use site_url() instead of network_site_url() for the form action. The latter seems needed only for password reset.

See #46349.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r45757 r45788  
    595595             * @param int Interval time (in seconds).
    596596             */
    597             $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 180 * DAY_IN_SECONDS );
     597            $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS );
    598598
    599599            if ( $admin_email_check_interval > 0 ) {
     
    618618        ?>
    619619
    620         <form class="admin-email-confirm-form" name="admin-email-confirm-form" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=confirm_admin_email', 'login_post' ) ); ?>" method="post">
     620        <form class="admin-email-confirm-form" name="admin-email-confirm-form" action="<?php echo esc_url( site_url( 'wp-login.php?action=confirm_admin_email', 'login_post' ) ); ?>" method="post">
    621621            <?php
    622622            /**
Note: See TracChangeset for help on using the changeset viewer.