]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_expire.c
* Variable names, comments, documentation, etc... removed the acronym 'BBS'
[citadel.git] / citadel / serv_expire.c
index 2ee22eae2899edae45be8d16776928702b81b2ff..5995d80edd6749545e96f08f04a4f2c0e9ab56f4 100644 (file)
@@ -360,7 +360,7 @@ void do_uid_user_purge(struct ctdluser *us, void *data) {
 #ifdef ENABLE_AUTOLOGIN
        struct PurgeList *pptr;
 
-       if ((us->uid != (-1)) && (us->uid != BBSUID)) {
+       if ((us->uid != (-1)) && (us->uid != CTDLUID)) {
                if (getpwuid(us->uid) == NULL) {
                        pptr = (struct PurgeList *)
                                malloc(sizeof(struct PurgeList));
@@ -432,6 +432,11 @@ void do_user_purge(struct ctdluser *us, void *data) {
         */
        if (us->timescalled == 0) purge = 1;
 
+       /* User number 0, as well as any negative user number, is
+        * also impossible.
+        */
+       if (us->usernum < 1L) purge = 1;
+
        if (purge == 1) {
                pptr = (struct PurgeList *) malloc(sizeof(struct PurgeList));
                pptr->next = UserPurgeList;