X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-mailgate;h=8d799591b427fafbf29645d17b1aca6ab7876c77;hp=1ec0e9f503047b2eca2a8a96c151c71f379fb217;hb=f2d431dee2f52f071afa1fd00d4e4589b1f5899e;hpb=d2405de0be9eba28a707280533d44a4fb4ae0034 diff --git a/ud-mailgate b/ud-mailgate index 1ec0e9f..8d79959 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -615,7 +615,7 @@ def HandleChange(Reply,DnRecord,Key): # Connect to the ldap server l = connect_to_ldap_and_check_if_locked(DnRecord) - if CommitChanges == 1: # only if we are still good to go + if CommitChanges == 1 and len(Attrs) > 0: # only if we are still good to go try: Res = FinishConfirmSudopassword(l, GetAttr(DnRecord,"uid"), Attrs) if not Res is None: