Viewing 2 replies - 1 through 2 (of 2 total)
  • i don’t have an answer for you in this dept but share as fyi in that i created group and made a post reserved for that group … when not logged in and a user of that group tries to access the post, they get 404 page not found error … when logged in, they can see the post … i share because it would be better instead of 404 for something more graceful like “sorry – you gotta be member of xyz-group to access this” … this is akin to your shortcode example above in that other plugins allow for -> if member of group show x, if nonmember show y …

    Thread Starter darkenpl

    (@darkenpl)

    // substitute actual group ID here (id argument in edit links on User > Role Groups)
    $group_id_in_question = 12; 
    
    global $current_user;
    if ( isset( $current_user->groups[ $group_id_in_question ] ) ) {
       // do stuff
    }

    So i fount answer. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Role Scoper] How to restrict acces based on user group’ is closed to new replies.