diff --git a/wp-admin/authorize-application.php b/wp-admin/authorize-application.php index 294d4fe10e..94327b05b7 100644 --- a/wp-admin/authorize-application.php +++ b/wp-admin/authorize-application.php @@ -88,7 +88,7 @@ if ( is_wp_error( $is_valid ) ) { ); } -if ( ! empty( $_SERVER['PHP_AUTH_USER'] ) || ! empty( $_SERVER['PHP_AUTH_PW'] ) ) { +if ( wp_is_site_protected_by_basic_auth( 'front' ) ) { wp_die( __( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ), __( 'Cannot Authorize Application' ), diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index 4177288547..b09f14fac5 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -739,7 +739,7 @@ endif; } } - if ( empty( $_SERVER['PHP_AUTH_USER'] ) && empty( $_SERVER['PHP_AUTH_PW'] ) ) { + if ( ! wp_is_site_protected_by_basic_auth( 'front' ) ) { ?>