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:
@ -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
|
||||
|
Reference in New Issue
Block a user