1
0
Fork 0

Always create the user when inviting from admin panel

Dieser Commit ist enthalten in:
Daniel García 2019-04-12 23:42:42 +02:00
Ursprung f25ab42ebb
Commit 2e12114350
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: FC8A7D14C3CD543A

Datei anzeigen

@ -145,9 +145,10 @@ fn invite_user(data: Json<InviteData>, _token: AdminToken, conn: DbConn) -> Empt
err!("Invitations are not allowed") err!("Invitations are not allowed")
} }
let mut user = User::new(email);
user.save(&conn)?;
if CONFIG.mail_enabled() { if CONFIG.mail_enabled() {
let mut user = User::new(email);
user.save(&conn)?;
let org_name = "bitwarden_rs"; let org_name = "bitwarden_rs";
mail::send_invite(&user.email, &user.uuid, None, None, &org_name, None) mail::send_invite(&user.email, &user.uuid, None, None, &org_name, None)
} else { } else {