feat: deprecate email, pre-verify users + documentation
This commit is contained in:
@@ -71,8 +71,18 @@ class User(AbstractBaseUser, PermissionsMixin):
|
||||
),
|
||||
]
|
||||
|
||||
@property
|
||||
def display_name(self) -> str:
|
||||
first = (self.first_name or "").strip()
|
||||
last = (self.last_name or "").strip()
|
||||
if first or last:
|
||||
return f"{first} {last}".strip()
|
||||
if self.email:
|
||||
return self.email
|
||||
return self.phone_number
|
||||
|
||||
def __str__(self):
|
||||
return self.email or self.phone_number or str(self.id)
|
||||
return self.display_name
|
||||
|
||||
|
||||
class OtpChannel(models.TextChoices):
|
||||
|
||||
Reference in New Issue
Block a user