[Optimize] Switched calls to username from id
This commit is contained in:
parent
3d72da0ca4
commit
4b98c09fb2
@ -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 settings
|
||||
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
|
||||
|
||||
// Gather un-cached data
|
||||
$statistics->setGetCache(false);
|
||||
$sharerate = $statistics->getUserSharerate($user_id, $interval);
|
||||
$sharerate = $statistics->getUserSharerate($username, $interval);
|
||||
$statistics->setGetCache(true);
|
||||
|
||||
// Output JSON format
|
||||
|
||||
Loading…
Reference in New Issue
Block a user