The index key for user records now omits non-alphanumeric characters, in addition...
[citadel.git] / citadel / citserver.c
index 6e287a7067bf458ffee95f9839547bef03b47ecd..3eb8cf2a7228c09e248555a0b4aa22c365d0d51f 100644 (file)
@@ -71,6 +71,13 @@ void master_startup(void)
        validate_config();
        migrate_legacy_control_record();
 
+       // If we have an existing database that is older than version 928, reindex the user records.
+       // Unfortunately we cannot do this in serv_upgrade.c because it needs to happen VERY early during startup.
+       int existing_db = CtdlGetConfigInt("MM_hosted_upgrade_level");
+       if ( (existing_db > 0) && (existing_db < 928) ) {
+               ForEachUser(reindex_user_928, NULL);
+       }
+
        /* Check floor reference counts */
        check_ref_counts();