mirror of
https://github.com/dani-garcia/vaultwarden
synced 2024-11-25 21:30:18 +00:00
Make sure an invitation is created when reinviting
This commit is contained in:
parent
50eeb4f651
commit
f1161c65fb
1 changed files with 3 additions and 2 deletions
|
@ -545,8 +545,9 @@ fn reinvite_user(org_id: String, user_org: String, headers: AdminHeaders, conn:
|
|||
Some(user) => user,
|
||||
None => err!("User not found."),
|
||||
};
|
||||
|
||||
Invitation::take(&user.email, &conn);
|
||||
|
||||
let mut invitation = Invitation::new(user.email.clone());
|
||||
invitation.save(&conn)?;
|
||||
|
||||
let org_name = match Organization::find_by_uuid(&org_id, &conn) {
|
||||
Some(org) => org.name,
|
||||
|
|
Loading…
Reference in a new issue