Deactivates users that were created more than the specified years ago

DeactivationError if the operation fails

  • Parameters

    • connection: ConnectionResult

      Database connection object

    • yearsThreshold: number = 4

      The number of years threshold for deactivation

    Returns Promise<DeactivationResult>

    Promise resolving to a DeactivationResult