X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=account.c;h=b96de37d000170a0198066a8b0dc5e2f64dd73ea;hb=11dfc0aa39e31496da16c708f972a6718dd7ee5c;hp=aff9d3a341dff8cb58827da73941aff78d508ea8;hpb=96d53ff49c308769efbf708e1e65819077cb7af6;p=apps%2Fmadmutt.git diff --git a/account.c b/account.c index aff9d3a..b96de37 100644 --- a/account.c +++ b/account.c @@ -176,15 +176,18 @@ int mutt_account_getlogin (ACCOUNT* account) #ifdef USE_IMAP else if (account->type == M_ACCT_TYPE_IMAP) { - if (ImapLogin) + if (ImapLogin) { strfcpy (account->login, ImapLogin, sizeof (account->login)); - else { - mutt_account_getuser (account); - strfcpy (account->login, account->user, sizeof (account->login)); + account->flags |= M_ACCT_LOGIN; } } #endif + if (!(account->flags & M_ACCT_LOGIN)) { + mutt_account_getuser (account); + strfcpy (account->login, account->user, sizeof (account->login)); + } + account->flags |= M_ACCT_LOGIN; return 0; @@ -211,7 +214,8 @@ int mutt_account_getpass (ACCOUNT * account) #endif else { snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "), - account->login, account->host); + account->flags & M_ACCT_LOGIN ? account->login : account->user, + account->host); account->pass[0] = '\0'; if (mutt_get_password (prompt, account->pass, sizeof (account->pass))) return -1;