Use \OC\Preferences::getValueForUsers() in Hooks::filterUsersBySetting()