|
|
|
@ -1762,20 +1762,6 @@ int LDAPManager::deleteGroupInfo(LDAPGroupInfo group, TQString *errstr) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
// Remove the user from all member groups
|
|
|
|
|
LDAPGroupInfoList groupInfoList = groups(&retcode);
|
|
|
|
|
LDAPGroupInfoList::Iterator it;
|
|
|
|
|
for (it = groupInfoList.begin(); it != groupInfoList.end(); ++it) {
|
|
|
|
|
LDAPGroupInfo group = *it;
|
|
|
|
|
if (group.userlist.contains(user.distinguishedName)) {
|
|
|
|
|
group.userlist.remove(user.distinguishedName);
|
|
|
|
|
retcode = updateGroupInfo(group, errstr);
|
|
|
|
|
if (retcode != 0) {
|
|
|
|
|
return retcode;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Delete the base DN entry
|
|
|
|
|
retcode = ldap_delete_ext_s(m_ldap, group.distinguishedName.ascii(), NULL, NULL);
|
|
|
|
|
if (retcode != LDAP_SUCCESS) {
|
|
|
|
|