getuserbyuid() now uses the extauth index, so we can do ldap sync
[citadel.git] / citadel / modules / upgrade / serv_upgrade.c
index 12261deb35c7c9271cd24b96db4b2135959a88d1..56ba219df0044f594d7395e0fc3005b3a2fa511b 100644 (file)
@@ -135,7 +135,11 @@ void reindex_uids_backend(struct ctdluser *usbuf, void *data) {
                                us.uid = NATIVE_AUTH_UID;
                        }
                        CtdlPutUserLock(&us);
-                       if (us.uid > 0) {               // if non-native auth , index by uid
+                       if ((us.uid > 0) && (us.uid != NATIVE_AUTH_UID)) {              // if non-native auth , index by uid
+
+                               syslog(LOG_DEBUG, "\033[31m attaching %d to %s \033[0m", us.uid , us.fullname);
+
+
                                StrBuf *claimed_id = NewStrBuf();
                                StrBufPrintf(claimed_id, "uid:%d", us.uid);
                                attach_extauth(&us, claimed_id);