Don't update LDAP if there are nothing to do

This commit is contained in:
Josué Tille 2019-12-22 12:14:29 +01:00 committed by Kay0u
parent d36fd27d5d
commit 41b136ff1b
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -215,6 +215,9 @@ class Authenticator(BaseAuthenticator):
actual_entry = self.search(base=dn, attrs=None)
ldif = modlist.modifyModlist(actual_entry[0], attr_dict, ignore_oldexistent=1)
if ldif == []:
return True
try:
if new_rdn:
self.con.rename_s(dn, new_rdn)