diff options
author | azul <azul@riseup.net> | 2017-04-03 08:51:56 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-04-03 08:51:56 +0000 |
commit | d4ec87744e5eed54126c78a7d2f1154d1e8e53c0 (patch) | |
tree | 70405839cd6bbf3331c94412b4178b6399dfafa3 /app/controllers | |
parent | 552483c9e3f73952839e934374e2aa8b07681f4d (diff) | |
parent | e9bdd2aa5a0662a9fc6d5ce730e26cfd560210ba (diff) |
Merge branch 'feature/clear-user' into 'master'
feature: delete user clearing username
Closes #26
See merge request !34
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 |