Issue #2062023 by rhm50, InternetDevels: Replace user_access() calls with $account->hasPermission() in statistics module.