MCPcopy Index your code
hub / github.com/Flagsmith/flagsmith / _create_user

Method _create_user

api/users/models.py:79–87  ·  view source on GitHub ↗

Create and save a User with the given email and password.

(self, email, password, **extra_fields)

Source from the content-addressed store, hash-verified

77 use_in_migrations = True
78
79 def _create_user(self, email, password, **extra_fields): # type: ignore[no-untyped-def]
80 """Create and save a User with the given email and password."""
81 if not email:
82 raise ValueError("The given email must be set")
83 email = self.normalize_email(email)
84 user = self.model(email=email, **extra_fields)
85 user.set_password(password)
86 user.save(using=self._db)
87 return user
88
89 def create_user(self, email, password=None, **extra_fields): # type: ignore[no-untyped-def]
90 """Create and save a regular User with the given email and password."""

Callers 2

create_userMethod · 0.95
create_superuserMethod · 0.95

Calls 2

set_passwordMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected