mirror of
https://github.com/ae-utbm/sith.git
synced 2026-11-05 00:39:32 +00:00
check email toxic domain at model-level
This commit is contained in:
1 parent
4f989d82bb
commit
e980c4d727
7 files changed
+31
-9
No files matched your search
+3
-2
@@ -55,6 +55,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
from phonenumber_field.modelfields import PhoneNumberField
|
||||
from PIL import Image, ImageOps
|
||||
|
||||
from antispam.models import AntiSpamEmailField
|
||||
from core.utils import get_last_promo
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -158,7 +159,7 @@ class User(AbstractUser):
|
||||
|
||||
first_name = models.CharField(_("first name"), max_length=64)
|
||||
last_name = models.CharField(_("last name"), max_length=64)
|
||||
email = models.EmailField(_("email address"), unique=True)
|
||||
email = AntiSpamEmailField(_("email address"), unique=True)
|
||||
date_of_birth = models.DateField(_("date of birth"), blank=True, null=True)
|
||||
nick_name = models.CharField(_("nick name"), max_length=64, null=True, blank=True)
|
||||
last_update = models.DateTimeField(_("last update"), auto_now=True)
|
||||
@@ -267,7 +268,7 @@ class User(AbstractUser):
|
||||
forum_signature = models.TextField(
|
||||
_("forum signature"), max_length=256, blank=True, default=""
|
||||
)
|
||||
second_email = models.EmailField(_("second email address"), null=True, blank=True)
|
||||
second_email = AntiSpamEmailField(_("second email address"), null=True, blank=True)
|
||||
phone = PhoneNumberField(_("phone"), null=True, blank=True)
|
||||
parent_phone = PhoneNumberField(_("parent phone"), null=True, blank=True)
|
||||
address = models.CharField(_("address"), max_length=128, blank=True, default="")
|
||||
|
||||
Reference in new issue
Block a user