Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
[*] Limit username for anon by 30 digits
Browse files Browse the repository at this point in the history
  • Loading branch information
Serge Travin committed Jul 30, 2011
1 parent 7521aff commit fbfd4aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setwithme/apps/core/anon_backend.py
Expand Up @@ -7,7 +7,7 @@ class AnonymousBackend(ModelBackend):
""" Create anon user. """
def authenticate(self, *args, **kwargs):
user_uuid = kwargs.get('user_uuid', '')
user_uuid = user_uuid or unicode(uuid.uuid4().hex)
user_uuid = user_uuid or unicode(uuid.uuid4().hex)[:30]
user, created = User.objects.get_or_create(
username=user_uuid)
print "Anon_user: %s" % user.username
Expand Down

0 comments on commit fbfd4aa

Please sign in to comment.