Supply a more informative error message when an administrator
authorArt Cancro <ajc@citadel.org>
Mon, 3 Dec 2007 02:18:36 +0000 (02:18 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 3 Dec 2007 02:18:36 +0000 (02:18 +0000)
attempts to create a new user from within Citadel while running
in host auth mode.

citadel/routines.c
citadel/user_ops.c

index 08f89540a5c714ce4743a72615c8834971501aa3..de5b4cf71df3e4a0108f5eaa03e9c819d535f74e 100644 (file)
@@ -123,7 +123,7 @@ void edituser(CtdlIPC *ipc, int cmd)
                                        newnow = 1;
                                        continue;
                                }
-                               scr_printf("%s\n",&buf[4]);
+                               scr_printf("%s\n", buf);
                        }
                }
                free(user);
index f9ac7c843c8333a90b612ca52ef5c7767ffcd7dc..866e508a1a7b640baa5c64efcfc872c4e89e2fa3 100644 (file)
@@ -1102,11 +1102,14 @@ void cmd_creu(char *cmdbuf)
                                "with no password");
                return;
        } else if (a == ERROR + ALREADY_EXISTS) {
-               cprintf("%d '%s' already exists.\n",
-                       ERROR + ALREADY_EXISTS, username);
+               cprintf("%d '%s' already exists.\n", ERROR + ALREADY_EXISTS, username);
+               return;
+       } else if ( (config.c_auth_mode == 1) && (a == ERROR + NO_SUCH_USER) ) {
+               cprintf("%d User accounts are not created within Citadel in host authentication mode.\n",
+                       ERROR + NO_SUCH_USER);
                return;
        } else {
-               cprintf("%d An error occured creating the user account.\n", ERROR + INTERNAL_ERROR);
+               cprintf("%d An error occurred creating the user account.\n", ERROR + INTERNAL_ERROR);
        }
 }