mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Ensure the 'Remember me' feature works with fresh installs.
This commit is contained in:
@@ -147,14 +147,9 @@ Few parameters need to be set in the *settings.py* configuration
|
||||
file to make Modoboa behave as expected::
|
||||
|
||||
SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Default value
|
||||
SESSION_COOKIE_AGE = 600 # time in seconds
|
||||
|
||||
The first parameter is optional but you must ensure it is set to
|
||||
``False`` (the default value).
|
||||
|
||||
The second one tells Django that a session inactive for this time
|
||||
should be considered as closed. You are free to adjust it according to
|
||||
your need.
|
||||
This parameter is optional but you must ensure it is set to ``False``
|
||||
(the default value).
|
||||
|
||||
The default configuration file provided by the *modoboa-admin.py*
|
||||
command is properly configured.
|
||||
|
||||
@@ -20,9 +20,9 @@ def dologin(request):
|
||||
user = authenticate(username=form.cleaned_data["username"],
|
||||
password=form.cleaned_data["password"])
|
||||
if user and user.is_active:
|
||||
login(request, user)
|
||||
if not form.cleaned_data["rememberme"]:
|
||||
request.session.set_expiry(0)
|
||||
login(request, user)
|
||||
if request.user.has_mailbox:
|
||||
request.session["password"] = encrypt(form.cleaned_data["password"])
|
||||
|
||||
|
||||
@@ -179,8 +179,6 @@ AUTHENTICATION_BACKENDS = (
|
||||
'modoboa.lib.authbackends.SimpleBackend',
|
||||
)
|
||||
|
||||
SESSION_COOKIE_AGE = 600
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
# performed by this configuration is to send an email to
|
||||
# the site admins on every HTTP 500 error when DEBUG=False.
|
||||
|
||||
Reference in New Issue
Block a user