summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 67fec58..d13c929 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -47,9 +47,13 @@ class Account
@user.refresh_identity
end
- def destroy
+ def destroy(destroy_identity=false)
return unless @user
- Identity.disable_all_for(@user)
+ if destroy_identity == false
+ Identity.disable_all_for(@user)
+ else
+ Identity.destroy_all_for(@user)
+ end
@user.destroy
end