Change account deletion page to have better explanations (#11753)

Fix deletion of unconfirmed account not freeing up the username

Add prefill of logged-in user's email in the reconfirmation form
This commit is contained in:
Eugen Rochko
2019-09-04 04:13:54 +02:00
committed by GitHub
parent c1e238a77b
commit 43f56f1291
7 changed files with 77 additions and 23 deletions

View File

@ -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!