SiT! Bugs - SiT!
View Issue Details
0001843SiT!LDAPpublic2013-03-01 13:172013-03-02 13:17
dipohl 
paulh 
normalmajoralways
resolvedfixed 
LinuxLinux2.6+later
3.67 LTS 
3.68Current SVN 
0001843: LDAP-Sync: Disabling of contacts fails
contact records, that are disabled or no longer existent in LDAP-Source will not get disabled in SiT DB.

The procedure will tell, that the account is already disabled in SiT DB, but that isn't true.
Delete or disable user account in LDAP-Source (EDIR in my case) and run auto.php
Check SiT error log
Wrong program logic in classes.inc.php.
Can be fixed by

sit-devel/lib # diff -u classes.inc.php.old classes.inc.php
--- classes.inc.php.old 2013-02-28 19:51:15.000000000 +0100
+++ classes.inc.php 2013-02-28 19:51:49.000000000 +0100
@@ -504,7 +504,7 @@
             $sql = "SELECT 1 FROM `{$GLOBALS['dbContacts']}` WHERE id = {$this->id} AND active = 'false'";
             $result = mysql_query($sql);
             if (mysql_error()) trigger_error(mysql_error(), E_USER_WARNING);
- if (mysql_num_rows($result) == 0)
+ if (mysql_num_rows($result) == 1)
             {
                 debug_log("Failed to disable contact {$this->username}, was already disabled");
                 $toReturn = true;
@@ -554,4 +554,4 @@
         else return false;
     }
 }
-?>
\ No newline at end of file
+?>
patch
related to 0001424resolved paulh LDAP service tries to disable a customer who is already disabled and fails 
Issue History
2013-03-01 13:17dipohlNew Issue
2013-03-01 13:18dipohlAdditional Information Updatedbug_revision_view_page.php?rev_id=298#r298
2013-03-01 13:21ivanTag Attached: patch
2013-03-01 19:47paulhNote Added: 0004722
2013-03-01 19:47paulhAssigned To => paulh
2013-03-01 19:47paulhStatusnew => assigned
2013-03-01 19:48paulhRelationship addedrelated to 0001424
2013-03-01 19:48paulhCategoryscheduler => LDAP
2013-03-02 13:17paulhNote Added: 0004725
2013-03-02 13:17paulhStatusassigned => resolved
2013-03-02 13:17paulhResolutionopen => fixed
2013-03-02 13:17paulhFixed in Version => Current SVN

Notes
(0004722)
paulh   
2013-03-01 19:47   
Thanks dipohl, will get this merged
(0004725)
paulh   
2013-03-02 13:17   
Thanks Diphol patch merged in r7566 and 79d45fe