class ZoneAccountSyncService (View source)

Mirrors zone ownership into the PowerDNS account field.

Methods

bool
isEnabled()

Whether owner-to-account sync is active (opt-in via dns.sync_zone_owner_to_account)

void
syncZoneAccount(int $domainId)

Update the zone's PowerDNS account field with the oldest owner's username

void
pushZoneAccount(int $domainId, string|null $username)

Push a resolved owner username to the backend, for callers with their own ownership lookup. Zones without a direct owner get an empty account so removed users don't linger.

Details

bool isEnabled()

Whether owner-to-account sync is active (opt-in via dns.sync_zone_owner_to_account)

Return Value

bool

void syncZoneAccount(int $domainId)

Update the zone's PowerDNS account field with the oldest owner's username

Parameters

int $domainId

Domain ID

Return Value

void

void pushZoneAccount(int $domainId, string|null $username)

Push a resolved owner username to the backend, for callers with their own ownership lookup. Zones without a direct owner get an empty account so removed users don't linger.

Parameters

int $domainId

Domain ID

string|null $username

Owner username, or null when the zone has no direct owner

Return Value

void