fixed issue where upgrade will fail if there are any ldap groups with no users in them.

This commit is contained in:
Frank Dillon 2006-07-13 00:57:04 +00:00
parent 45db6cf962
commit 5be9f70efc

View file

@ -54,7 +54,7 @@ sub fixGroups {
foreach my $linkId (keys %{$ldapLinks}) {
my $ldapLink = $ldapLinks->{$linkId};
my $people = $ldapLink->getProperty($hash->{ldapGroup},$hash->{ldapGroupProperty});
if(scalar(@{$people})) {
if($people && scalar(@{$people})) {
$session->db->write("update groups set ldapLinkId=? where groupId=?",[$linkId,$hash->{groupId}]);
}
}