]> andersk Git - moira.git/commitdiff
show "needs coupon" state, and allow it to be changed, for half-registered
authordanw <danw>
Fri, 3 Sep 1999 14:21:04 +0000 (14:21 +0000)
committerdanw <danw>
Fri, 3 Sep 1999 14:21:04 +0000 (14:21 +0000)
users

clients/moira/user.c

index e722b9c9a7f42c04beaa43ffb3bc37e17f2e5090..c4908624d1c48c5030b747be5a8e5aceba5236ed 100644 (file)
@@ -131,7 +131,8 @@ static void PrintUserInfo(char **info)
          UserState(atoi(info[U_STATE])), info[U_MITID],
          *info[U_SIGNATURE] ? (status ? "Bad" : "Yes") : "No");
   Put_message(buf);
-  if (!atoi(info[U_STATE]))
+  status = atoi(info[U_STATE]);
+  if (status == 0 || status == 2)
     {
       sprintf(buf, "User %s secure Account Coupon to register",
              atoi(info[U_SECURE]) ? "needs" : "does not need");
@@ -203,7 +204,7 @@ void CorrectCapitalization(char **name)
 
 char **AskUserInfo(char **info, Bool name)
 {
-  int i;
+  int i, state;
 #ifdef HAVE_GDSS
   SigInfo si;
 #endif
@@ -308,7 +309,8 @@ char **AskUserInfo(char **info, Bool name)
   if (GetValueFromUser("Comments", &info[U_COMMENT]) == SUB_ERROR)
     return NULL;
 
-  if (!name || !atoi(info[U_STATE]))
+  state = atoi(info[U_STATE]);
+  if (!name || state == 0 || state == 2)
     {
       if (YesNoQuestion("User needs secure Account Coupon to register",
                        atoi(info[U_SECURE]) ? TRUE : FALSE) == FALSE)
This page took 0.084944 seconds and 5 git commands to generate.