Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to see if a user is in a group


  • lonecrowdotnet
    Member

    @lonecrowdotnet

    At the bottom of my WP Edit User screen in the dashboard is a section called “Group Membership”
    screenie: http://lonecrow.com/groups.gif

    Are these BP groups or WP groups? When I look at the HTML source I don’t see clues as to which it is.

    What I am trying to do is create another group called “Associate Member”. Then, filter them out of the bp member directory, and deny them access to the bp forums.

    I am a long time developer and DBA but have zero experience with WP let alone BP.

    My initial idea was that in the member_loop I would just check each user in the loop to check which group they are a member of, and only output those that are full members. Then I thought this may mess up the pagination because pagination is probably done in the db layer.

    I really don’t want to reverse engineer the entire WP and BP framework to make this one little change.

    So I would appreciate it greatly if someone could give me a head start by pointing me in the direction of the appropriate layer to make this change.

Viewing 2 replies - 1 through 2 (of 2 total)
  • That is neither core WordPress, or core BuddyPress :) What other plugins do you have running?


    lonecrowdotnet
    Member

    @lonecrowdotnet

    Thanks that helps a lot :) Looks like that belongs to something called Page Security by Contexture, which won’t be any good to me in this instance.

    So then my question is, what is the best way to filter the member directory based on an extended buddypress field? They have a profile field that is a multi-selct box and it contains an option that would identify those that are not to be displayed in their member directory.

    I was presuming that BP would have some $user.extended-field.value that I could use to filter the list in the member-loop page but as I said before I am concerned this it would be a cheesy little hax that would probably mess up the pagination and god knows what else.

    If I wanted to modify the SQL statement just for the member-loop what is the best practice way to do that?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to see if a user is in a group’ is closed to new replies.
Skip to toolbar