user_table optimization

Rather than looking up by username, it makes more sense to look the
stats up by user ID to reduce the number of needed joins.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Dan McGee 2012-05-02 16:14:01 -05:00 committed by Lukas Fleischer
parent e9d8e9b8c0
commit 97085daadc
2 changed files with 7 additions and 8 deletions

View file

@ -58,8 +58,8 @@ echo __(
<td class='boxSoft' valign='top'>
<?php
if (!empty($_COOKIE["AURSID"])) {
$user = username_from_sid($_COOKIE["AURSID"]);
user_table($user, $dbh);
$userid = uid_from_sid($_COOKIE["AURSID"]);
user_table($userid, $dbh);
echo '<br />';
}