diff options
author | Azul <azul@riseup.net> | 2016-07-05 08:54:43 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-07-05 08:54:43 +0200 |
commit | 798c1240b59403b8d8de9559776718266b2ecba5 (patch) | |
tree | 74b53a8762710a76c4ca5d270b6ef9545dfca221 /app/models/account.rb | |
parent | fcc8207f84249612eba719b8aa77cd7c51e5ad5a (diff) | |
parent | 30da8e6ffa1eefafb9762645efb85e0beed236c6 (diff) |
Merge remote-tracking branch 'pr/222' into merge-branch
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 7310250..d722caa 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -69,15 +69,13 @@ class Account @user.refresh_identity end - def destroy(destroy_identity=false) + def destroy(release_handles=false) return unless @user if !@user.is_tmp? - if destroy_identity == false - @user.identities.each do |id| + @user.identities.each do |id| + if release_handles == false id.orphan! - end - else - @user.identities.each do |id| + else id.destroy end end |