From 97c6a43edac5057fd3828c48b057e948b0f2ee9e Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 16 Jan 2019 05:40:04 +0000 Subject: [PATCH] Admin: Use `is_user_logged_in()` instead of `wp_validate_auth_cookie()` in `admin-post.php`. This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered. Props jmdodd. Fixes #45475. git-svn-id: https://develop.svn.wordpress.org/trunk@44615 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/admin-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/admin-post.php b/src/wp-admin/admin-post.php index b4aed5275b..48e76feec5 100644 --- a/src/wp-admin/admin-post.php +++ b/src/wp-admin/admin-post.php @@ -31,7 +31,7 @@ do_action( 'admin_init' ); $action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action']; -if ( ! wp_validate_auth_cookie() ) { +if ( ! is_user_logged_in() ) { if ( empty( $action ) ) { /** * Fires on a non-authenticated admin post request where no action is supplied.