Skip to main content

load_user_profile

Function load_user_profile 

Source
pub async fn load_user_profile(
    db: &Db,
    user_id: i64,
) -> Result<Option<UserProfile>>
Expand description

Load a user by id for display purposes. Returns Ok(None) for a missing id (callers map to 404). Returns Err only on a real DB failure or a corrupted role string. Never reads password_hash.