]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/user_ops.c
validate_recipients() - completed removal of unused param
[citadel.git] / citadel / server / user_ops.c
index 7c85b011893b76daa02311e668d234e05de4d9c7..e35b00a27e71b222b20c5f3772b9b7aaac255552 100644 (file)
@@ -398,7 +398,7 @@ int getuserbyuid(struct ctdluser *usbuf, uid_t number) {
        // Yes, we do this the long way.  Someday we might want to try an index.
        // No, we don't use CtdlForEachUser() because that requires multiple reads for each record
        cdb_rewind(CDB_USERS);
-       while (cdbus = cdb_next_item(CDB_USERS), cdbus.val.ptr!=NULL) {
+       while (cdbus = cdb_next_item(CDB_USERS), cdbus.val.ptr!=NULL) {         // always read through to the end
                usptr = (struct ctdluser *) cdbus.val.ptr;
 
                if (usptr->uid == number) {
@@ -505,7 +505,7 @@ int CtdlLoginExistingUser(const char *trythisname) {
        
                // If that didn't work, try to log in as if the supplied name * is an e-mail address
                if (found_user != 0) {
-                       valid = validate_recipients(username, NULL, 0);
+                       valid = validate_recipients(username, 0);
                        if (valid != NULL) {
                                if (valid->num_local == 1) {
                                        found_user = CtdlGetUser(&CC->user, valid->recp_local);
@@ -1040,10 +1040,9 @@ void ForEachUser(void (*CallBack) (char *, void *out_data), void *in_data) {
        }
 
 
-       cdb_rewind(CDB_USERS);
-
        // Phase 1 : build an array of all our user account names
-       while (cdbus = cdb_next_item(CDB_USERS), cdbus.val.ptr!=NULL) {
+       cdb_rewind(CDB_USERS);
+       while (cdbus = cdb_next_item(CDB_USERS), cdbus.val.ptr!=NULL) {         // always read through to the end
                usptr = (struct ctdluser *) cdbus.val.ptr;
                if (strlen(usptr->fullname) > 0) {
                        array_append(all_users, usptr->fullname);