diff options
author | Azul <azul@riseup.net> | 2017-04-03 10:43:42 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2017-04-03 10:43:42 +0200 |
commit | e9bdd2aa5a0662a9fc6d5ce730e26cfd560210ba (patch) | |
tree | 70405839cd6bbf3331c94412b4178b6399dfafa3 /app/controllers | |
parent | 552483c9e3f73952839e934374e2aa8b07681f4d (diff) |
feature: delete user clearing username
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/users_controller.rb | 6 |
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 |