Subscriber registration – system description

Steps and validation of the registration flow, activation after payment, closing registrations that expire unpaid, and the permission keys.

Overview

Registering a new tenant from the admin: company group, client company, NAV row, user, credit account and subscription in one step, through the Dlbtsignup library. Table names carry the installation's own prefix in the database.

Registration (signup.save → Dlbtsignup::register())

  1. Validation: company group and company name up to 120 characters, tax number 8 or 11 digits, username at least 3 characters, e-mail, plan, user group.
  2. Create or find the company group and the client company, NAV row.
  3. Create the user in the configured sign-up user group (if 0, a user_group_id error), attach to the client.
  4. Open the subscription: with a trial trial, without one active and billing_mode = credit.
  5. syncClientPlan(); without a trial the rows are set to metered; base route permission sync.
  6. Answer: generated password, deadline, step log.

The form shows the registration requirement list (Dlbtsignup::requirements()), the trial per plan (trialDaysFor(), from the definition–plan link) and the payment deadline days. The registration's system functions are listed in SIGNUP_FEATURES.

Activation (signup.activate)

Dlbtsignup::activate(): subscription active, billing_mode = 'paid', period now + 1 year, tenant status 1, syncClientPlan() (the plan's own limits are restored).

Payment deadline sweep

The catalog-side cron/signupsweep controller runs Dlbtsignup::sweep(): for registrations expired without payment the subscription becomes expired, the company and its members status = 0; nothing is deleted. It is not among the cron queue job types.

Permissions and limitations

  • list (canSee or super), add, activate (canAction or super): all SYSTEM – any signed-in user may use them.
  • Activation checks neither payment nor content scope.
  • Data touched: company_group, company, NAV table, base user table, subscription_account, subscription, user_feature.