Skip to main content

update_email_for_user

Function update_email_for_user 

Source
pub async fn update_email_for_user(
    conn: &mut PgConnection,
    upstream_id: &i32,
    new_email: String,
) -> ModelResult<Uuid>
Expand description

Points the account with this upstream id at a new address, keeping users.email_domain in step.

The clear_email_verification trigger drops proof of the old address as part of the update; the returned local user id lets the caller mail a fresh link.