Fixed #24737 -- Removed unnecesary kwargs in UserManager._create_user()
This commit is contained in:
parent
eef95ea96f
commit
db0a0c4b8a
|
@ -170,14 +170,12 @@ class UserManager(BaseUserManager):
|
||||||
"""
|
"""
|
||||||
Creates and saves a User with the given username, email and password.
|
Creates and saves a User with the given username, email and password.
|
||||||
"""
|
"""
|
||||||
now = timezone.now()
|
|
||||||
if not username:
|
if not username:
|
||||||
raise ValueError('The given username must be set')
|
raise ValueError('The given username must be set')
|
||||||
email = self.normalize_email(email)
|
email = self.normalize_email(email)
|
||||||
user = self.model(username=username, email=email,
|
user = self.model(username=username, email=email,
|
||||||
is_staff=is_staff, is_active=True,
|
is_staff=is_staff, is_superuser=is_superuser,
|
||||||
is_superuser=is_superuser,
|
**extra_fields)
|
||||||
date_joined=now, **extra_fields)
|
|
||||||
user.set_password(password)
|
user.set_password(password)
|
||||||
user.save(using=self._db)
|
user.save(using=self._db)
|
||||||
return user
|
return user
|
||||||
|
|
Loading…
Reference in New Issue