Skip to:
Content
Pages
Categories
Search
Top
Bottom

Restrict users view of other members/groups/blogs based on gender


  • 2238246
    Inactive

    Hi, I’ve used WP a lot and new to buddypress scene. I am planning a new project which gives males and females privacy but ability to contribute to ideas. Specifically:

    • Allows males and females log to be able to join and contribute to group blogs

    • Personal profile pics could only be viewed by members of the same sex

    • Private messages could only be sent to members of the same sex

    I would have prob created two different installations on two subdomains but wouldn’t know how to make them overlap on the group blogs….i’m thinking best way is to adjust the SQL to check the gender field before displaying messaging options/personal blogs/profile pics…..but where would i look?

Viewing 1 replies (of 1 total)

  • fishbowl81
    Participant

    @fishbowl81

    Wow, that is a tricky idea.

    sharing groups, means you probably need to share the users table, which means you might as well run a single install. (because users are referenced by ID, having seperated user tables means there could and would be overlap)

    your 2nd bullet, profile pics only viewable by members of the same gender, probably would want to edit the display avatar functions, that shouldn’t be too hard. Probably want to make a list on paper of places the avatars appear, and confirm those places are calling functions and not just using values directly from sql queries.

    3rd bullet, what may make sense is adjust the “is_logged_in” function, with some creative hacking, you could compare gender of who is logged in, to the profile of who is being viewed.

    I think if you create a quick and dirty function along the lines of this:

    function genderCheck($userID){

    if(genderOf($bp->user->loggedin) == genderOf($userID))

    return true

    else

    return false

    }

    and then this function

    function genderOf($userID){

    // sql stuff

    return $gender;

    }

    YES I KNOW IT IS BAD CODE, I just wanted to point you in a direction.

    Brad

Viewing 1 replies (of 1 total)
  • The topic ‘Restrict users view of other members/groups/blogs based on gender’ is closed to new replies.
Skip to toolbar