set user language on login to override session

This commit is contained in:
wvengen 2013-06-28 13:30:26 +02:00
parent c48ce138f3
commit 0978b84f4d

View file

@ -11,6 +11,7 @@ class SessionsController < ApplicationController
if user
session[:user_id] = user.id
session[:scope] = FoodsoftConfig.scope # Save scope in session to not allow switching between foodcoops with one account
session[:locale] = user_settings_language
if session[:return_to].present?
redirect_to_url = session[:return_to]
session[:return_to] = nil