Skip to content

[Resolved] Get users who can read a page/post

Home Forums Obsolete: 2.0 beta Get users who can read a page/post

Tagged: 

This topic contains 6 replies, has 2 voices, and was last updated by 5 years, 4 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #16193

    I need to send an email to users who have permission to read a page when it is published.

    Is available a function like “users_who_can(‘read’, $post->ID)”  in presspermit?

     

    I tried a loop around all registered users:

    – setting current user with –> wp_set_current_user( $user_id );

    – checking –>  if ( current_user_can( ‘read’, $object_id ) )

    But it always return all registered users.

     

    Thanks for any hint.

    #16194

    [ login required ]

    #16244

    [ login required ]

    #16245

    [ login required ]

    #16249

    [ login required ]

    #16254

    [ login required ]

    #16297

    [ login required ]

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘Obsolete: 2.0 beta’ is closed to new topics and replies.

Registered members have full access to Pro support forums here.

Feel free to log in or purchase a support key.