about summary refs log tree commit diff
path: root/app/services/suspend_account_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-29 23:37:14 +0200
committerGitHub <noreply@github.com>2019-07-29 23:37:14 +0200
commitf48c7689d230b915ed740a4774736bd5998cbc66 (patch)
tree3d883f06fe8e3abbc5653e029ac8612ae114f135 /app/services/suspend_account_service.rb
parenta4a81c5434c73139f7c1d66f2687039237c5208a (diff)
parent51411267fda00db576230a270a10e31992378c18 (diff)
Merge pull request #1179 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services/suspend_account_service.rb')
-rw-r--r--app/services/suspend_account_service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb
index 00cffcdfc..902af376c 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -64,6 +64,7 @@ class SuspendAccountService < BaseService
       @account.user.destroy
     else
       @account.user.disable!
+      @account.user.invites.where(uses: 0).destroy_all
     end
   end