X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/53aa7259bb0612eb48a17d0b954ad71ea37d87a4..96f68da077fd1e516c7db12bf81dec95133ea1a5:/app/controllers/accounts_controller.rb?ds=inline diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 06eb031c4..63da1293f 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -51,4 +51,14 @@ class AccountsController < ApplicationController redirect_to auth_url(params[:user][:auth_provider], params[:user][:auth_uid]), :status => :temporary_redirect end end + + def destroy + current_user.soft_destroy! + + session.delete(:user) + session_expires_automatically + + flash[:notice] = t ".success" + redirect_to root_path + end end