Structs§
Functions§
- apply_
email_ 🔒update - Writes the new email onto
user_detailsand keepsusers.email_domainin step, within an already-open transaction. Theclear_email_verificationtrigger drops proof of the old address as part of theuser_detailsupdate. - delete_
user - Soft-deletes the user and takes their OAuth credentials down with the account.
- email_
domain_ from_ email - The domain part of an address, as stored in
users.email_domain. - find_
by_ upstream_ id - get_
active_ by_ id - Like
get_by_id, but only returns a user that is not soft-deleted. - get_
all_ user_ ids_ with_ user_ exercise_ states_ on_ course - Includes all users who have returned an exercise on a course course instance
- get_
by_ email - Looks up a user by email (case-insensitive) using the
lower(email)index onuser_details. - get_
by_ id - get_
by_ ids - get_
users_ by_ course_ instance_ enrollment - get_
users_ ids_ in_ db_ from_ upstream_ ids - insert
- insert_
with_ upstream_ id_ and_ moocfi_ id - update_
email_ for_ user - Points the account with this upstream id at a new address. The returned local user id lets the caller mail a fresh link.
- update_
email_ for_ user_ by_ id - Points the account at a new address by user id rather than upstream id, for accounts (e.g. local-only ones) that have no upstream id. Same effect as update_email_for_user otherwise.