PDA

View Full Version : Profile display options depending on usergroup?


mladair
03-15-2003, 02:51 AM
I would like to be able to restrict viewing members / profile information based on a per - usergroup basis. I see that v2 has some of this functionality, but it is an all or none situation and I don't want to make all members of all users in a particular group

Basically, I would like members of my organization to be able to view certain custom fields when they look at another member's profile. This would be things like name / address / phone, etc.

Users who are not members of my organization would only be able to view the "standard" information about a user.

Being a brand new owner of vB (as of last night), I need some hints on where to start digging around. Any thoughts / ideas would be greatly appreciated.

Thanks!
Matt

Xenon
03-15-2003, 09:50 AM
:)
her you go :)

open member.php find that:
$profilefields=$DB_site->query("SELECT profilefieldid,required,title
FROM profilefield
WHERE hidden=0
ORDER BY displayorder");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
if ($backcolor=="{firstaltcolor}") {
$backcolor="{secondaltcolor}";
$bgclass = "alt2";
} else {
$backcolor="{firstaltcolor}";
$bgclass = "alt1";
}

$profilefieldname="field$profilefield[profilefieldid]";
$profilefield[value]=$userinfo[$profilefieldname];
eval("\$customfields .= \"".gettemplate("getinfo_customfields")."\";");

}

and just change it to that:
if(in_array($bbuserinfo['usergroupid'], array(5,6,7))) { $profilefields=$DB_site->query("SELECT profilefieldid,required,title
FROM profilefield
WHERE hidden=0
ORDER BY displayorder");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
if ($backcolor=="{firstaltcolor}") {
$backcolor="{secondaltcolor}";
$bgclass = "alt2";
} else {
$backcolor="{firstaltcolor}";
$bgclass = "alt1";
}

$profilefieldname="field$profilefield[profilefieldid]";
$profilefield[value]=$userinfo[$profilefieldname];
eval("\$customfields .= \"".gettemplate("getinfo_customfields")."\";");

}
}


then just add to the 5,6,7 every usergroupid which should be able to see those additional infos :)