mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Prevent session expiry as long as the user has reloaded in the past two weeks
Fixes (?) #416. (imported from commit 9d56fe4125f742e2cdccc41ebd385daacccf461f)
This commit is contained in:
parent
ced6921491
commit
161af7838f
@ -146,6 +146,11 @@ def accounts_home(request):
|
||||
|
||||
@login_required(login_url = settings.HOME_NOT_LOGGED_IN)
|
||||
def home(request):
|
||||
# We need to modify the session object every two weeks or it will expire.
|
||||
# This line makes reloading the page a sufficient action to keep the
|
||||
# session alive.
|
||||
request.session.modified = True
|
||||
|
||||
user_profile = UserProfile.objects.get(user=request.user)
|
||||
|
||||
num_messages = UserMessage.objects.filter(user_profile=user_profile).count()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user