From 597920d497eccd6e37d76075217f400e769bef1e Mon Sep 17 00:00:00 2001 From: JoryHogeveen Date: Wed, 7 Jun 2017 18:34:57 +0200 Subject: [PATCH] Use store function. No need for all that code --- includes/class-api.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/class-api.php b/includes/class-api.php index 462a55ac..2409020d 100644 --- a/includes/class-api.php +++ b/includes/class-api.php @@ -56,11 +56,7 @@ public static function is_superior_admin( $user_id = null ) { ); if ( null === $user_id ) { - $store = view_admin_as()->store(); - $user = $store->get_curUser(); - if ( isset( $user->ID ) ) { - $user_id = $store->get_curUser()->ID; - } + $user_id = VAA_View_Admin_As_Store::get_originalUserData( 'ID' ); } // Is it a super admin and is it one of the manually configured superior admins?