Browse Source
Always create the user when inviting from admin panel
pull/460/head
Daniel García
6 years ago
No known key found for this signature in database
GPG Key ID: FC8A7D14C3CD543A
1 changed files with
3 additions and
2 deletions
-
src/api/admin.rs
|
|
@ -145,9 +145,10 @@ fn invite_user(data: Json<InviteData>, _token: AdminToken, conn: DbConn) -> Empt |
|
|
|
err!("Invitations are not allowed") |
|
|
|
} |
|
|
|
|
|
|
|
let mut user = User::new(email); |
|
|
|
user.save(&conn)?; |
|
|
|
|
|
|
|
if CONFIG.mail_enabled() { |
|
|
|
let mut user = User::new(email); |
|
|
|
user.save(&conn)?; |
|
|
|
let org_name = "bitwarden_rs"; |
|
|
|
mail::send_invite(&user.email, &user.uuid, None, None, &org_name, None) |
|
|
|
} else { |
|
|
|