Skip to content
Permalink
Browse files

Site Health: Revert [46323-46325] for further discussion of how the a…

…dmin email verification should be filtered.

See #48153.

git-svn-id: https://develop.svn.wordpress.org/trunk@46361 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
desrosj committed Sep 30, 2019
1 parent 74f9cf7 commit dc07c1f52fd71fa00c7844020319e4ac96da2a7c
Showing with 4 additions and 11 deletions.
  1. +4 −11 src/wp-login.php
@@ -590,7 +590,7 @@ function retrieve_password() {
/**
* Filters the interval for redirecting the user to the admin email confirmation screen.
* If `0` (zero), or any "falsey" value is returned, the user will not be redirected.
* If `0` (zero) is returned, the user will not be redirected.
*
* @since 5.3.0
*
@@ -1232,19 +1232,12 @@ function retrieve_password() {
exit;
}
/**
* Filters the capability required for displaying the admin email check screen.
*
* @since 5.3.0
*
* @param string $capability The capability required to display the admin email check screen.
*/
$admin_check_cap = apply_filters( 'admin_email_check_cap', 'manage_options' );
// Check if it is time to add a redirect to the admin email confirmation screen.
if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( $admin_check_cap ) ) {
if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( 'manage_options' ) ) {
$admin_email_lifespan = (int) get_option( 'admin_email_lifespan' );
// If `0` (or anything "falsey" as it is cast to int) is returned, the user will not be redirected
// to the admin email confirmation screen.
/** This filter is documented in wp-login.php */
$admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS );

0 comments on commit dc07c1f

Please sign in to comment.
You can’t perform that action at this time.