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-09-06 12:06:59 +0200
committerGitHub <noreply@github.com>2019-09-06 12:06:59 +0200
commit286bf110c3e69042049968440f1eb99372a7e0e6 (patch)
treeddf1c32803022cb200087a8c4c6818612ca76d3b /app/services/suspend_account_service.rb
parent0128509605ed90ee5a29d6af2347ab32bd46aeb9 (diff)
parent4434e2eb7f9942b44561c2f7702af3ed3854b8db (diff)
Merge pull request #1211 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 902af376c..85da7e921 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -61,6 +61,7 @@ class SuspendAccountService < BaseService
     return if !@account.local? || @account.user.nil?
 
     if @options[:including_user]
+      @options[:destroy] = true if !@account.user_confirmed? || @account.user_pending?
       @account.user.destroy
     else
       @account.user.disable!