]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/accounts_controller.rb
Merge remote-tracking branch 'upstream/pull/3726'
[rails.git] / app / controllers / accounts_controller.rb
index 06eb031c46a2f81a18ea21f5712439a655aa9fe3..63da1293ff731ecfe85d0430f9c6f0f1819a2008 100644 (file)
@@ -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