diff options
author | Luis Del Giudice <luis.dg19@gmail.com> | 2015-05-02 03:45:42 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-05-02 21:07:58 -0400 |
commit | db0a0c4b8ae490d0596f2c210d3edba3d700374a (patch) | |
tree | 234d90edac3dc022c33666d152746bbf3620ed65 | |
parent | eef95ea96faef0b7dbbe0c8092202b74f68a899b (diff) | |
download | django-db0a0c4b8ae490d0596f2c210d3edba3d700374a.tar.gz |
Fixed #24737 -- Removed unnecesary kwargs in UserManager._create_user()
-rw-r--r-- | django/contrib/auth/models.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 4dc49c2d0c..b631f11271 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -170,14 +170,12 @@ class UserManager(BaseUserManager): """ Creates and saves a User with the given username, email and password. """ - now = timezone.now() if not username: raise ValueError('The given username must be set') email = self.normalize_email(email) user = self.model(username=username, email=email, - is_staff=is_staff, is_active=True, - is_superuser=is_superuser, - date_joined=now, **extra_fields) + is_staff=is_staff, is_superuser=is_superuser, + **extra_fields) user.set_password(password) user.save(using=self._db) return user |