Expand description
Linking a student number without the emailed round trip, when the study registry’s primary address for a person is an address one of our accounts has proved it controls.
This is a terminal branch taken before a linking mail is claimed, never a filter in front of
one: every outcome other than FastTrackDecision::Link falls through to the ordinary mailed
link. The population whose two addresses differ is exactly the population the linking mail exists
for, and nothing here may narrow it.
Structs§
- Fast
Track Candidate - What an account offers the fast track, gathered in one query so the decision below stays pure.
- Fast
Track Link - One person the fast track is about to link, as the caller read them off the registry’s roster.
- Fast
Track Lookup - One roster entry to look an account up by.
- Registry
Name - The names the study registry holds for a listed person, for the loose name check.
Enums§
- Fast
Track Decision - Why the fast track did or did not fire for one listed person. Every variant but
Linkmeans the ordinary linking mail is still owed.
Constants§
- MATCHED_
FIELD_ PRIMARY - Recorded on the link as
verified_via_email_match_field. The study registry’s secondary address is self-entered, so it is never proof; the value is reserved rather than accepted.
Functions§
- decide_
fast_ track - The whole fast-track predicate, as one pure function over facts the caller has already read.
- find_
fast_ track_ candidate - The one live account holding
primary_email, with everythingdecide_fast_trackneeds.Nonewhen no account holds it, and also when more than one does — the fast track only ever acts on an unambiguous account, and ambiguity falls through to the mailed link like everything else. - find_
fast_ track_ candidates find_fast_track_candidatefor a whole roster in one query, keyed bysisu_person_id.- fold 🔒
- Casefolds and strips diacritics so
MäkeläandMakelacompare equal. - link_
by_ email_ match - Links
person’s student number tocandidate’s account and returns the new link’s id. - names_
loosely_ 🔒match - Whether the two records plausibly describe the same person: either surname or any one of the registry’s given names has to agree, ignoring case and diacritics.