8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

fix: 🐛 Use correct settings in ldap_sync + typo

This commit is contained in:
Yoann Pétri 2021-02-17 22:10:46 +01:00 committed by klafyvel
parent 43b6a2cdf2
commit ce2e77546e

View file

@ -135,7 +135,7 @@ def synchronise_user(sender, **kwargs):
user_ldap.home_directory = user.home_directory user_ldap.home_directory = user.home_directory
user_ldap.mail = user.get_mail user_ldap.mail = user.get_mail
user_ldap.given_name = user.surname.lower() + "_" + user.name.lower()[:3] user_ldap.given_name = user.surname.lower() + "_" + user.name.lower()[:3]
user_ldap.gid = settings.LDAP["user_gid"] user_ldap.gid = settings.DEFAULT_GID
if "{SSHA}" in user.password or "{SMD5}" in user.password: if "{SSHA}" in user.password or "{SMD5}" in user.password:
# We remove the extra $ added at import from ldap # We remove the extra $ added at import from ldap
user_ldap.user_password = user.password[:6] + user.password[7:] user_ldap.user_password = user.password[:6] + user.password[7:]