Skip to content

Commit

Permalink
Use store function. No need for all that code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoryHogeveen committed Jun 7, 2017
1 parent 2bd52f6 commit 597920d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions includes/class-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 597920d

Please sign in to comment.