Archived
Minor fix for password reset
This commit is contained in:
1 parent
79a14fca02
commit
b9b61a31a1
2 files changed
+5
-1
No files matched your search
@@ -19,6 +19,7 @@ class InsideBackend(object):
|
||||
inside_user = InsideUser.objects.filter(
|
||||
Q(password=password_hash) & (Q(ldap_username=username) | Q(email=username))
|
||||
)
|
||||
# TODO log all login attempts
|
||||
# AuthLog.objects.create()
|
||||
|
||||
if not len(inside_user) == 1:
|
||||
|
||||
+4
-1
@@ -2,7 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
|
||||
import datetime
|
||||
|
||||
class Action(models.Model):
|
||||
connection_name = 'inside'
|
||||
@@ -352,6 +352,9 @@ class InsideUser(models.Model):
|
||||
created = models.DateTimeField(blank=True, null=True)
|
||||
membership_trial = models.CharField(max_length=255)
|
||||
|
||||
# ugly hack to use django internals for password reset
|
||||
last_login = datetime.datetime(2001, 1, 1)
|
||||
|
||||
def __unicode__(self):
|
||||
if not self.ldap_username:
|
||||
return 'User {}'.format(self.pk)
|
||||
|
||||
Reference in new issue
Block a user