From ccd17b7ffa5cde99c2ab946251b725f2759b153a Mon Sep 17 00:00:00 2001 From: Miraty Date: Wed, 21 Jun 2023 22:08:57 +0200 Subject: [PATCH] Clear entries in ssh-keys when deleting account --- fn/auth.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fn/auth.php b/fn/auth.php index d96d1cb..fd3d48f 100644 --- a/fn/auth.php +++ b/fn/auth.php @@ -133,6 +133,8 @@ function authDeleteUser(string $user_id): void { ], result_code: $code); if ($code !== 0) output(500, 'Can\'t remove user\'s directory.'); + + query('delete', 'ssh-keys', ['username' => $user_id]); } query('delete', 'users', ['id' => $user_id]);