mirror of
https://github.com/docusealco/docuseal
synced 2026-11-16 08:12:32 -05:00
fix remove account
This commit is contained in:
1 parent
3b4fdd1615
commit
d45ff6b2af
1 file changed
+4
-2
@@ -49,9 +49,11 @@ class AccountsController < ApplicationController
|
||||
def destroy
|
||||
authorize!(:manage, current_account)
|
||||
|
||||
removed_email = true_user.email.sub('@', '+removed@')
|
||||
removed_email = true_user.email.sub('@', "+removed#{Time.current.to_i}@") if User.exists?(email: removed_email)
|
||||
|
||||
true_user.skip_reconfirmation!
|
||||
true_user.update!(locked_at: Time.current, archived_at: Time.current,
|
||||
email: true_user.email.sub('@', '+removed@'))
|
||||
true_user.update!(locked_at: Time.current, archived_at: Time.current, email: removed_email)
|
||||
true_user.account.update!(archived_at: Time.current)
|
||||
|
||||
# rubocop:disable-next Layout/LineLength
|
||||
|
||||
Reference in new issue
Block a user