Skip to content

Commit

Permalink
Specify an URL to redirect after logout via settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kidhab committed Mar 29, 2023
1 parent 8420323 commit e49fc62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ def create

def destroy
logout
redirect_to login_url, :notice => I18n.t('sessions.logged_out')
if FoodsoftConfig[:logout_redirect_to].present?
redirect_to FoodsoftConfig[:logout_redirect_to]
else
redirect_to login_url, :notice => I18n.t('sessions.logged_out')
end
end

# redirect to root, going to default foodcoop when none given
Expand Down

0 comments on commit e49fc62

Please sign in to comment.