aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-04-29 19:07:59 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-04-29 19:08:08 -0700
commit5a3c5aad08e8f3d4f59cc67e78b6db35c81b2308 (patch)
treee6e091f978ce08948d20e0cc86988902dc67c544
parentd2bd8be6e29fbca82cffe06613ef02ae6cc9185d (diff)
When password is nil, only retrieve the account type
-rw-r--r--src/core/provider/MCAccountValidator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/provider/MCAccountValidator.cpp b/src/core/provider/MCAccountValidator.cpp
index d35bd000..3c77e989 100644
--- a/src/core/provider/MCAccountValidator.cpp
+++ b/src/core/provider/MCAccountValidator.cpp
@@ -222,6 +222,12 @@ void AccountValidator::startCheckingHosts()
setupServices();
}
+ if ((mPassword == NULL) && (mOAuth2Token == NULL)) {
+ // Shortcut to retrieve only the account type.
+ callback()->operationFinished(this);
+ return;
+ }
+
if (mImapServices->count() == 0)
mImapError = ErrorNoValidServerFound;