feat: deprecate email, pre-verify users + documentation

This commit is contained in:
2026-03-14 14:40:52 +03:00
parent ad711d1daf
commit 9787fb699a
13 changed files with 223 additions and 21 deletions
+11 -1
View File
@@ -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):