int RegisterUser(int argc, char **argv)
{
char *args[MAX_ARGS_SIZE];
- char *login, *fstype = NULL;
+ char *login, *potype = NULL;
char temp_buf[BUFSIZ];
int status;
sprintf(temp_buf, "u%s", args[0]);
login = strdup(temp_buf);
- if ((GetValueFromUser("Login name for this user? ", &login) == SUB_ERROR) ||
- (GetFSTypes(&fstype, FALSE) == SUB_ERROR))
+ if (GetValueFromUser("Login name for this user? ", &login) == SUB_ERROR)
{
args[1] = login;
FreeInfo(args); /* This work because the NULL temination is ok. */
}
Put_message("KERBEROS code not added, did not reserve name with kerberos.");
args[1] = login;
- args[2] = fstype;
+
+ sprintf(temp_buf, "IMAP");
+ potype = strdup(temp_buf);
+ if (GetValueFromUser("P.O. Box Type for this user? ", &potype) == SUB_ERROR)
+ {
+ args[2] = potype;
+ FreeInfo(args);
+ return DM_NORMAL;
+ }
+ if (strcmp(potype, "POP") && strcmp(potype, "IMAP"))
+ {
+ sprintf(temp_buf, "Unknown P.O. Box type.");
+ Put_message(temp_buf);
+ FreeInfo(args);
+ return DM_NORMAL;
+ }
+ args[2] = potype;
args[3] = NULL;
switch ((status = do_mr_query("register_user", CountArgs(args),