summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2017-04-03 10:43:42 +0200
committerAzul <azul@riseup.net>2017-04-03 10:43:42 +0200
commite9bdd2aa5a0662a9fc6d5ce730e26cfd560210ba (patch)
tree70405839cd6bbf3331c94412b4178b6399dfafa3 /app/controllers
parent552483c9e3f73952839e934374e2aa8b07681f4d (diff)
feature: delete user clearing username
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