Merge pull request #6784 from cmrd-senya/deletion-redirect-fixup

Redirect to "/users/sign_in" after AccountDeletion
This commit is contained in:
Dennis Schubert 2016-04-21 07:22:38 +02:00
commit 2b5f20ef93
2 changed files with 2 additions and 1 deletions

View file

@ -98,6 +98,7 @@ Contributions are very welcome, the hard work is done!
* Improve search and mentions suggestions [#6788](https://github.com/diaspora/diaspora/pull/6788)
* Redesign back to top button [#6782](https://github.com/diaspora/diaspora/pull/6782)
* Adjusted Facebook integration for a successful review [#6778](https://github.com/diaspora/diaspora/pull/6778)
* Redirect to the sign-in page instead of the stream on account deletion [#6784](https://github.com/diaspora/diaspora/pull/6784)
## Bug fixes
* Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852)

View file

@ -95,7 +95,7 @@ class UsersController < ApplicationController
if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password])
current_user.close_account!
sign_out current_user
redirect_to(stream_path, :notice => I18n.t('users.destroy.success'))
redirect_to(new_user_session_path(format: request[:format]), notice: I18n.t("users.destroy.success"))
else
if params[:user].present? && params[:user][:current_password].present?
flash[:error] = t 'users.destroy.wrong_password'