]> andersk Git - moira.git/commitdiff
Change default PO box type to IMAP.
authorzacheiss <zacheiss>
Tue, 14 Mar 2000 21:53:36 +0000 (21:53 +0000)
committerzacheiss <zacheiss>
Tue, 14 Mar 2000 21:53:36 +0000 (21:53 +0000)
In RegisterUser, don't ask questions about filesystem type since we're
going to ignore the answer anyway.  Instead, ask what kind of PO box type.

clients/moira/pobox.c
clients/moira/user.c

index 466461e60363f41a0671c212fb1863148ac73997..ee86c403eea77c30f21d74c41afb51ffdee64640 100644 (file)
@@ -444,7 +444,7 @@ int SetUserPOBox(int argc, char **argv)
            }
          /* Fall through from MR_MACHINE case. */
        case FALSE:
-         type = strdup("POP");
+         type = strdup("IMAP");
          if (GetValueFromUser("Kind of Local PO Box?", &type) == SUB_ERROR)
            {
              free(type);
index d34a4b2942be3c45707436a2edde9ff091310ce3..4503c5e72acdb515e0cf6ccdb4bd0389b41a0319 100644 (file)
@@ -556,7 +556,7 @@ static void GiveBackLogin(char *name)
 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;
 
@@ -579,8 +579,7 @@ int RegisterUser(int argc, char **argv)
 
   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. */
@@ -588,7 +587,23 @@ int RegisterUser(int argc, char **argv)
     }
   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),
This page took 0.043676 seconds and 5 git commands to generate.