mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 22:52:26 +00:00
No harcoded var
This commit is contained in:
parent
75a83490da
commit
71f8dacb2c
1 changed files with 7 additions and 5 deletions
|
@ -571,11 +571,13 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
|
||||||
try:
|
try:
|
||||||
user_ldap = LdapUser.objects.get(uidNumber=self.uid_number)
|
user_ldap = LdapUser.objects.get(uidNumber=self.uid_number)
|
||||||
except LdapUser.DoesNotExist:
|
except LdapUser.DoesNotExist:
|
||||||
if self.state != 3:
|
# Freshly created users are NOT synced in ldap base
|
||||||
user_ldap = LdapUser(uidNumber=self.uid_number)
|
if self.state == self.STATE_NOT_YET_ACTIVE:
|
||||||
base = True
|
return
|
||||||
access_refresh = True
|
user_ldap = LdapUser(uidNumber=self.uid_number)
|
||||||
mac_refresh = True
|
base = True
|
||||||
|
access_refresh = True
|
||||||
|
mac_refresh = True
|
||||||
if base:
|
if base:
|
||||||
user_ldap.name = self.pseudo
|
user_ldap.name = self.pseudo
|
||||||
user_ldap.sn = self.pseudo
|
user_ldap.sn = self.pseudo
|
||||||
|
|
Loading…
Reference in a new issue