Nico Golde:
[apps/madmutt.git] / account.c
index 0499e0c..aff9d3a 100644 (file)
--- a/account.c
+++ b/account.c
@@ -54,11 +54,11 @@ int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * a2)
 #endif
 
   if (a1->flags & a2->flags & M_ACCT_USER)
-    return (!safe_strcmp (a1->user, a2->user));
+    return (!mutt_strcmp (a1->user, a2->user));
   if (a1->flags & M_ACCT_USER)
-    return (!safe_strcmp (a1->user, user));
+    return (!mutt_strcmp (a1->user, user));
   if (a2->flags & M_ACCT_USER)
-    return (!safe_strcmp (a2->user, user));
+    return (!mutt_strcmp (a2->user, user));
 
   return 1;
 }
@@ -178,8 +178,10 @@ int mutt_account_getlogin (ACCOUNT* account)
   {
     if (ImapLogin)
       strfcpy (account->login, ImapLogin, sizeof (account->login));
-    else
-      strfcpy (account->login, ImapUser, sizeof (account->login));
+    else {
+      mutt_account_getuser (account);
+      strfcpy (account->login, account->user, sizeof (account->login));
+    }
   }
 #endif