[Optimize] Switched calls to username from id

This commit is contained in:
Neozonz 2014-01-20 16:01:29 -08:00
parent 4b98c09fb2
commit 4d845c7c73

View File

@ -8,13 +8,14 @@ $api->isActive();
// Check user token
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
$username = $user->getUsername($user_id)
// Fetch some settings
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
// Gather un-cached data
$statistics->setGetCache(false);
$hashrate = $statistics->getUserHashrate($user_id, $interval);
$hashrate = $statistics->getUserHashrate($username, $interval);
$statistics->setGetCache(true);
// Output JSON