2015-01-18, 12:29 PM
(This post was last modified: 2015-01-18, 12:39 PM by Destroy666.)
Note: the plugin is far from being optimised and will generate at most 6 queries per profile while 0 are needed, You should use $memprofile variable instead of selecting all columns in the users table multiple times.. E. g.
And it would be nice if you used lang variables for easy translation.
//no $db->simple_select("users", "*", "uid=".$profileuid." AND whocanview=3"); query here anymore
if($memprofile['whocanview'] == 3)
{
if(!$mybb->user['uid'])
error("This user has a private profile!");
}
elseif($memprofile['whocanview'] == 4)
{
if($mybb->user['uid'])
error("This user has a private profile!");
}
// and so on..
And it would be nice if you used lang variables for easy translation.