Skip to content

Commit

Permalink
Merge pull request #6784 from cmrd-senya/deletion-redirect-fixup
Browse files Browse the repository at this point in the history
Redirect to "/users/sign_in" after AccountDeletion
  • Loading branch information
denschub committed Apr 21, 2016
2 parents d6171e5 + 77bd220 commit 2b5f20e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def destroy
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'
Expand Down

0 comments on commit 2b5f20e

Please sign in to comment.