sets session[:locale] = user.locale after login

This commit is contained in:
Manuel Wiedenmann 2013-07-18 16:09:32 +02:00
parent 6569579c02
commit 206709aa61

View file

@ -9,6 +9,7 @@ class SessionsController < ApplicationController
def create
user = User.authenticate(params[:nick], params[:password])
if user
session[:locale] = user.locale
session[:user_id] = user.id
session[:scope] = FoodsoftConfig.scope # Save scope in session to not allow switching between foodcoops with one account
if session[:return_to].present?