From 215e387f2a96876664ff07fa882de20a14e86aa7 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 3 Dec 2007 02:18:36 +0000 Subject: [PATCH] Supply a more informative error message when an administrator attempts to create a new user from within Citadel while running in host auth mode. --- citadel/routines.c | 2 +- citadel/user_ops.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/citadel/routines.c b/citadel/routines.c index 08f89540a..de5b4cf71 100644 --- a/citadel/routines.c +++ b/citadel/routines.c @@ -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); diff --git a/citadel/user_ops.c b/citadel/user_ops.c index f9ac7c843..866e508a1 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -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); } } -- 2.39.2