Skip to content

Commit

Permalink
Fix account deletion form
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Feb 6, 2019
1 parent 9169b04 commit 0dbbbaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def index
end

def delete_account
unless params[:i_am_sure].present?
unless params[:user][:i_am_sure].present?
flash[:error] = 'You did not check the "I am sure" checkbox.'
return redirect_to settings_path
end
Expand All @@ -20,7 +20,7 @@ def delete_account
end

@user.delete!
if params[:disown].present?
if params[:user][:disown].present?
InactiveUser.disown_all_by_author! @user
end
reset_session
Expand Down

0 comments on commit 0dbbbaa

Please sign in to comment.