From be7e713c69af3d4c51e084f453358281aedf3e0d Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 18 Mar 2010 23:12:31 +1300 Subject: [PATCH] Fix deactivation of users no longer in LDAP. --- inc/drivers_ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index 2f497ed8..b011eb12 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -384,7 +384,7 @@ function sync_LDAP(){ if ( isset($c->do_not_sync_from_ldap) && isset($c->do_not_sync_from_ldap[$v]) ) continue; $params[':u'.$i++] = strtolower($v); } - if ( $usr_in != '' ) { + if ( count($params) > 0 ) { $c->messages[] = sprintf(i18n('- deactivating users : %s'),join(', ',$users_to_deactivate)); $qry = new AwlQuery( 'UPDATE usr SET active = FALSE WHERE lower(username) IN ('.implode(',',array_keys($params)).')', $params); $qry->Exec('sync_LDAP',__LINE__,__FILE__);