# metricool/2.0.2/app/Features/UserSettings/UserSettingsLoader.php

Metricool – Social media and site statistics, version 2.0.2. 39 lines.

- Page: https://pluginprobe.com/plugins/metricool/2.0.2/code/app/Features/UserSettings/UserSettingsLoader.php
- Raw: https://pluginprobe.com/plugins/metricool/2.0.2/raw/app/Features/UserSettings/UserSettingsLoader.php
- Modified: 2026-06-11T08:45:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/metricool/2.0.2/code/app/Features/UserSettings/UserSettingsLoader.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Metricool\Features\UserSettings;

use Metricool\Features\AbstractLoader;
use Metricool\Services\DashboardService;
use Metricool\Support\Helpers\Storages\EnvironmentConfig;
use Metricool\Support\Helpers\Storages\RequestStorage;

class UserSettingsLoader extends AbstractLoader
{
    private DashboardService $dashboard;

    public function __construct(EnvironmentConfig $env, RequestStorage $request, DashboardService $dashboard)
    {
        parent::__construct($env, $request);

        $this->dashboard = $dashboard;
    }

    /**
     * @inheritDoc
     */
    public function isEnabled(): bool
    {
        return $this->dashboard->isOnboardingCompleted() && current_user_can('metricool_manage');
    }

    /**
     * @inheritDoc
     */
    public function inScope(): bool
    {
        return true;
    }
}

```
