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())
- 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.
- Create or find the company group and the client company, NAV row.
- Create the user in the configured sign-up user group (if 0, a
user_group_iderror), attach to the client. - Open the subscription: with a trial
trial, without oneactiveandbilling_mode = credit. syncClientPlan(); without a trial the rows are set tometered; base route permission sync.- 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(canSeeor super),add,activate(canActionor super): allSYSTEM– 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.