Merge pull request #6784 from cmrd-senya/deletion-redirect-fixup
Redirect to "/users/sign_in" after AccountDeletion
This commit is contained in:
commit
2b5f20ef93
2 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
* 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)
|
* 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)
|
* 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
|
## Bug fixes
|
||||||
* Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852)
|
* Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852)
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class UsersController < ApplicationController
|
||||||
if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password])
|
if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password])
|
||||||
current_user.close_account!
|
current_user.close_account!
|
||||||
sign_out current_user
|
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
|
else
|
||||||
if params[:user].present? && params[:user][:current_password].present?
|
if params[:user].present? && params[:user][:current_password].present?
|
||||||
flash[:error] = t 'users.destroy.wrong_password'
|
flash[:error] = t 'users.destroy.wrong_password'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue