public function getUserSetting(User $user, $name, $default = null)
    {
        if (false === $user->getSettings()->containsKey($name)) {
            $this->loadusersSettings();

            return array_key_exists($name, $this->usersSettings) ? $this->usersSettings[$name] : $default;
        }

        return $user->getSettings()->get($name)->getValue();
    }