Skip to content

Commit

Permalink
Merge pull request #503 from iftakharul-islam/fix-permission-security
Browse files Browse the repository at this point in the history
Fix permission security
  • Loading branch information
iftakharul-islam authored Oct 29, 2024
2 parents 9e14ac3 + cc0defa commit 7e5ca35
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions core/Permissions/Abstract_Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ abstract class Abstract_Permission implements Permission {
*/
public function __construct( WP_REST_Request $request ) {
$this->request = $request;

$user_id = $request->get_param( 'user_id' );
$user_id = empty( $user_id ) ? 0 : intval( $user_id );

if ( empty( $user_id ) && ! empty( get_current_user_id() ) ) {
$user_id = get_current_user_id();
}

wp_set_current_user( $user_id );
}

/**
Expand Down

0 comments on commit 7e5ca35

Please sign in to comment.