Quote:
Originally Posted by eXtremeTim
This is simple to fix I just fixed it on my site.
do the following
Find in member.php
PHP Code:
$bbteam = $DB_site->query_first("
SELECT *
FROM " . TABLE_PREFIX . "teams
WHERE teamid = $bbuserinfo[teamid]
");
Replace with
PHP Code:
$bbteam = $DB_site->query_first("
SELECT *
FROM " . TABLE_PREFIX . "teams
WHERE teamid = $userinfo[teamid]
");
Miz if you want I can release all the changes I did to my files to your for your next version so that you have a load optimized version. My sites url is http://www.extremechatforums.com/forums/index.php I cleaned up the code on forumdisplay using left joins. I cleaned up the code for showthread (required changes to showthread and functions_showthread) I also cleaned up the not in team list which now runs at 11 (4 of which are from some stats tracking code im using on my site so its really 7 queries) queries on my site no matter how many users as displayed.
|
Although, it is again one of those times that my mind does not function pretty well, I do not think that this fix is the proper one. bbteam is the team to which a team admin is inviting the user, not the team to which the user belongs.
A more appropriate fix would be the following in member.php:
Find:
PHP Code:
$bbteam = $DB_site->query_first("
SELECT *
FROM " . TABLE_PREFIX . "teams
WHERE teamid = $bbuserinfo[teamid]
Replace that with:
PHP Code:
if ($bbuserinfo['teamadmin'])
{
$bbteam = $DB_site->query_first("
SELECT *
FROM " . TABLE_PREFIX . "teams
WHERE teamid = $bbuserinfo[teamid]
");
}
With this mod, if the user of the program is a team admin, he can invite the member whose profile he is viewing, to his team.
My 2 Eurocents only.