Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


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

Skip to toolbar