Commits

James Bennett committed 5521d34 Merge

Merge fix for #55

Comments (0)

Files changed (1)

registration/models.py

         
         """
         salt = sha_constructor(str(random.random())).hexdigest()[:5]
-        activation_key = sha_constructor(salt+user.username).hexdigest()
+        username = user.username
+        if isinstance(username, unicode):
+            username = username.encode('utf-8')
+        activation_key = sha_constructor(salt+username).hexdigest()
         return self.create(user=user,
                            activation_key=activation_key)