Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
birger
users
Commits
229f01bc
Commit
229f01bc
authored
Sep 06, 2018
by
o@immerda.ch
Browse files
keep language across session reset
parent
3900ccab
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/application_controller.rb
View file @
229f01bc
...
...
@@ -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
app/controllers/sessions_controller.rb
View file @
229f01bc
...
...
@@ -116,7 +116,8 @@ EOF
end
end
reset_session
reset_user_session
unless
@handoff
session
[
:user_id
]
=
res
[
'email'
]
update_session_expiry
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment