david / django-invitation-backend (http://code.welldev.org/django-invitation/)

A fork of django-invitation to use the new django-registration-backends branch. See http://bitbucket.org/ubernostrum/django-registr... for the reasons.

Changed (Δ39 bytes):

raw changeset »

invitation/models.py (1 lines added, 1 lines removed)

Up to file-list invitation/models.py:

@@ -38,7 +38,7 @@ class InvitationKeyManager(models.Manage
38
38
        from a combination of the ``User``'s username and a random salt.
39
39
        """
40
40
        salt = sha_constructor(str(random.random())).hexdigest()[:5]
41
        key = sha_constructor(salt+user.username).hexdigest()
41
        key = sha_constructor("%s%s%s" % (datetime.datetime.now(), salt, user.username)).hexdigest()
42
42
        return self.create(from_user=user, key=key)
43
43
44
44
    def remaining_invitations_for_user(self, user):