Skip to main content

link_by_email_match

Function link_by_email_match 

Source
pub async fn link_by_email_match(
    conn: &mut PgConnection,
    person: &FastTrackLink<'_>,
    candidate: &FastTrackCandidate,
) -> ModelResult<Uuid>
Expand description

Links person’s student number to candidate’s account and returns the new link’s id.

Goes through replace_verified_student_number, so it also soft-deletes the outstanding mailed tokens for that number — a link already in somebody’s inbox must stop working once the number is linked — and recomputes the account’s registrations. Caller must have decided FastTrackDecision::Link first; this function re-checks nothing.