Commits

Florian Schweikert  committed 2cb5ff9

use existing user with expert email instead of creating new user with email as username

  • Participants
  • Parent commits b411c97

Comments (0)

Files changed (1)

File freieit/views/newexpert.py

         if form.is_valid():
             email = form.data['email']
 
-            u, created = User.objects.get_or_create(username=email, email=email)
+            u, created = User.objects.get_or_create(email=email)
             if created:
+                u.username = email
                 u.set_unusable_password()
                 u.save()