Expand description
What changing an account’s linked student number does to its registrations: both the student’s own unlink/claim and an admin’s unlink/manual-link go through this, so the audit trail and the recompute stay in one place regardless of who acted.
Functions§
- record_
student_ number_ change - Audits a change to
subject_user_id’s linked student number on every registration it can affect, then applies it. Returns how many of the account’s registrations the recompute moved. - unlink_
verified_ student_ number - Retires a verified link and reopens every registration it had gated, as one step. Both the student’s own unlink and the admin unlink call this rather than each doing the soft-delete and the recompute themselves; callers keep owning the transaction and any admin-action row around it.