summaryrefslogtreecommitdiff
blob: 631a03f3e35a97549f722b3c4ac7ab5c50143fe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/uip/inc.c b/uip/inc.c
index cf12ab8..b8384cd 100644
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -496,8 +496,7 @@ main (int argc, char **argv)
      * a POP server?
      */
     if (inc_type == INC_POP) {
-	if (user == NULL)
-	    user = getusername ();
+
 	if ( strcmp( POPSERVICE, "kpop" ) == 0 ) {
 	    kpop = 1;
 	}
@@ -506,6 +505,12 @@ main (int argc, char **argv)
 	else
 	    ruserpass (host, &user, &pass);
 
+	/* 
+	 * Do this _after_ ruserpass, otherwise the login field will be unusable
+	 */
+	if (user == NULL)
+	    user = getusername ();
+
 	/*
 	 * initialize POP connection
 	 */