diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index f3158536..ce9b7921 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -907,7 +907,7 @@ async fn send_invite(org_id: &str, data: Json, headers: AdminHeaders new_user.save(&mut conn).await?; for group in data.groups.iter() { - let mut group_entry = GroupUser::new(String::from(group), user.uuid.clone()); + let mut group_entry = GroupUser::new(String::from(group), new_user.uuid.clone()); group_entry.save(&mut conn).await?; }