Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 77bd220e rédigé par cmrd Senya's avatar cmrd Senya
Parcourir les fichiers

Redirect to "/users/sign_in" after AccountDeletion

There is no point to redirect to "/stream" after the account deletion
because the user is logged off.
parent a414fb23
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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'
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter