1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

Delete sends belonging to user on user delete (#1116)

* Delete sends belonging to user on user delete

* Update User_DeleteById.sql

* Clean up bad autoformats

Co-authored-by: Addison Beck <abeck@bitwarden.com>

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Addison Beck <abeck@bitwarden.com>
This commit is contained in:
Matt Gibson
2021-02-05 12:37:55 -06:00
committed by GitHub
parent edd4bc2623
commit 79cc6df0fd
2 changed files with 114 additions and 1 deletions

View File

@ -87,6 +87,13 @@ BEGIN
[GrantorId] = @Id
OR
[GranteeId] = @Id
-- Delete Sends
DELETE
FROM
[dbo].[Send]
WHERE
[UserId] = @Id
-- Finally, delete the user
DELETE
@ -96,4 +103,4 @@ BEGIN
[Id] = @Id
COMMIT TRANSACTION User_DeleteById
END
END