summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/users_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 0a0f551..da82d1c 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -44,7 +44,7 @@ class UsersController < ApplicationController
end
def destroy
- @user.account.destroy
+ @user.account.destroy(release_handles)
flash[:notice] = I18n.t(:account_destroyed)
# admins can destroy other users
if @user != current_user
@@ -65,4 +65,8 @@ class UsersController < ApplicationController
params.require(:user).permit(:password, :password_confirmation)
end
end
+
+ def release_handles
+ ! params[:block_username]
+ end
end