[Optimize] Switched calls to username from id
This commit is contained in:
parent
4b98c09fb2
commit
4d845c7c73
@ -8,13 +8,14 @@ $api->isActive();
|
|||||||
|
|
||||||
// Check user token
|
// Check user token
|
||||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||||
|
$username = $user->getUsername($user_id)
|
||||||
|
|
||||||
// Fetch some settings
|
// Fetch some settings
|
||||||
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
|
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
|
||||||
|
|
||||||
// Gather un-cached data
|
// Gather un-cached data
|
||||||
$statistics->setGetCache(false);
|
$statistics->setGetCache(false);
|
||||||
$hashrate = $statistics->getUserHashrate($user_id, $interval);
|
$hashrate = $statistics->getUserHashrate($username, $interval);
|
||||||
$statistics->setGetCache(true);
|
$statistics->setGetCache(true);
|
||||||
|
|
||||||
// Output JSON
|
// Output JSON
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user