|
@@ -65,6 +65,7 @@ class Member(CoinLdapSyncMixin, AbstractUser):
|
|
|
|
|
|
# Following fields are managed by the parent class AbstractUser :
|
|
|
# username, first_name, last_name, email
|
|
|
+ # However we hack the model to force theses fields to be required. (see below)
|
|
|
|
|
|
# This property is used to change password in LDAP. Used in sync_to_ldap.
|
|
|
# Should not be defined manually. Prefer use set_password method that hash
|
|
@@ -205,7 +206,7 @@ class Member(CoinLdapSyncMixin, AbstractUser):
|
|
|
class Meta:
|
|
|
verbose_name = 'membre'
|
|
|
|
|
|
-
|
|
|
+# Hack to force email, first_name ans last_name to be required by Member model
|
|
|
Member._meta.get_field('email')._unique = True
|
|
|
Member._meta.get_field('email').blank = False
|
|
|
Member._meta.get_field('email').null = False
|