X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fexpire%2Fserv_expire.c;h=33d9508e43d009f2b933610746d2444cf71c8ea5;hb=f6a784d414ae095a6d9cd6a0e0de453adfb19692;hp=b494d9755495cd513c6ca5856464cd9f2a0a6047;hpb=e5d2f1a62f71469f8e3f71adc6d89db5850b8b96;p=citadel.git diff --git a/citadel/modules/expire/serv_expire.c b/citadel/modules/expire/serv_expire.c index b494d9755..33d9508e4 100644 --- a/citadel/modules/expire/serv_expire.c +++ b/citadel/modules/expire/serv_expire.c @@ -443,7 +443,7 @@ void do_user_purge(struct ctdluser *us, void *data) { /* User number 0, as well as any negative user number, is * also impossible. */ - if (us->usernum < 1L) purge = 1; + if (us->usernum < 0L) purge = 1; /* If the user has no full name entry then we can't purge them * since the actual purge can't find them. @@ -452,18 +452,21 @@ void do_user_purge(struct ctdluser *us, void *data) { */ if (IsEmptyStr(us->fullname)) { - purge=0; - if (users_corrupt_msg == NULL) + if (us->usernum > 0L) { - users_corrupt_msg = malloc(SIZ); - strcpy(users_corrupt_msg, "The auto-purger found the following user numbers with no name.\n" - "Unfortunately the auto-purger is not yet able to fix this problem.\n" - "This problem is not considered serious since a user with no name can\n" - "not log in.\n"); - } + purge=0; + if (users_corrupt_msg == NULL) + { + users_corrupt_msg = malloc(SIZ); + strcpy(users_corrupt_msg, "The auto-purger found the following user numbers with no name.\n" + "Unfortunately the auto-purger is not yet able to fix this problem.\n" + "This problem is not considered serious since a user with no name can\n" + "not log in.\n"); + } - users_corrupt_msg=realloc(users_corrupt_msg, strlen(users_corrupt_msg)+SIZ); - snprintf(&users_corrupt_msg[strlen(users_corrupt_msg)], SIZ, " %ld\n", us->usernum); + users_corrupt_msg=realloc(users_corrupt_msg, strlen(users_corrupt_msg)+SIZ); + snprintf(&users_corrupt_msg[strlen(users_corrupt_msg)], SIZ, " %ld\n", us->usernum); + } }