2015-01-19, 07:54 PM
(2015-01-18, 12:29 PM)Destroy666 Wrote: 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.
//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.
Ah, that's cool!
Thanks, I didn't know this var of mybb.
Very useful, I'm going to updating the plugin.
Thanks!