Skip to content

User Attributes Data DTO Reference

The ThingsTelemetry\Traccar\Dto\UserAttributesData provides typed access to user-specific attributes supported by Traccar. All fields are optional; booleans default to false, numbers and strings default to null.

php
$attrs = $user->attributes; // UserAttributesData
$raw = $attrs->toArray();   // array<string, mixed>

Map and UI

  • languagestring|null
  • mapGeofencesbool
  • mapLiveRoutesstring|null
  • mapDirectionstring|null
  • mapFollowbool
  • mapClusterbool
  • mapOnSelectbool
  • activeMapStylesstring|null
  • devicePrimarystring|null
  • deviceSecondarystring|null
  • soundEventsstring|null
  • soundAlarmsstring|null
  • positionItemsstring|null

Map Providers / API keys

  • googleKey, locationIqKey, mapboxAccessToken, mapTilerKey, bingMapsKey, openWeatherKey, tomTomKey, hereKeystring|null

UI disable flags

  • ui.disableSavedCommands, ui.disableGroups, ui.disableAttributes, ui.disableEvents, ui.disableVehicleFeatures, ui.disableDrivers, ui.disableComputedAttributes, ui.disableCalendars, ui.disableMaintenancebool

Web map tuning

  • web.liveRouteLengthint|null
  • mapLineWidthfloat|null
  • mapLineOpacityfloat|null
  • web.selectZoomint|null
  • web.maxZoomint|null
  • iconScalefloat|null
  • navigationAppLink, navigationAppTitlestring|null

Notifications / Integrations

  • telegramChatId, pushoverUserKey, pushoverDeviceNamesstring|null

SMTP settings

  • mail.smtp.hoststring|null
  • mail.smtp.portint|null
  • mail.smtp.starttls.enable, mail.smtp.starttls.required, mail.smtp.ssl.enable, mail.smtp.authbool
  • mail.smtp.ssl.trust, mail.smtp.ssl.protocols, mail.smtp.from, mail.smtp.username, mail.smtp.passwordstring|null

Other

  • termsAcceptedbool
  • billingLinkstring|null

Example

php
use ThingsTelemetry\Traccar\Dto\UserAttributesData;

$attrs = new UserAttributesData(
    mapGeofences: true,
    webLiveRouteLength: 1000,
    uiDisableGroups: true,
);

$attrs->toArray();
// [
//   'mapGeofences' => true,
//   'web.liveRouteLength' => 1000,
//   'ui.disableGroups' => true,
//   ...
// ]

Released under the MIT License.