pub async fn update_user_pii(
pool: &Pool<MySql>,
user_id: i64,
first_name: Option<&str>,
last_name: Option<&str>,
full_name: Option<&str>,
) -> Result<()>
Expand description
Updates a user’s personal information.
This function updates the user’s personal information in the user_pii table.
§Arguments
pool
- Database connection pool for executing the queryuser_id
- Unique identifier of the userfirst_name
- Optional new first namelast_name
- Optional new last namefull_name
- Optional new full name (can be generated if first and last are provided)
§Returns
Ok(())
- Successfully updated user PIIErr(anyhow::Error)
- Failed to update user PII