Commit 229f01bc authored by o@immerda.ch's avatar o@immerda.ch
Browse files

keep language across session reset

parent 3900ccab
......@@ -87,6 +87,11 @@ class ApplicationController < ActionController::Base
true
end
def reset_user_session
reset_session
session[:locale] = I18n.locale
end
def update_session_expiry
session[:expires_at] = 15.minutes.from_now.to_i
end
......@@ -95,6 +100,6 @@ class ApplicationController < ActionController::Base
def destroy_session
session[:user_id] = nil
session[:mail_crypt_recovery_token] = nil
reset_session
reset_user_session
end
end
......@@ -116,7 +116,8 @@ EOF
end
end
reset_session
reset_user_session
unless @handoff
session[:user_id] = res['email']
update_session_expiry
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment