Skip to main content

Module users

Module users 

Source

Structs§

User

Functions§

apply_email_update 🔒
Writes the new email onto user_details and keeps users.email_domain in step, within an already-open transaction. The clear_email_verification trigger drops proof of the old address as part of the user_details update.
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 on user_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.