Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Gallien <matthieu_gallien@yahoo.fr>2021-08-12 16:29:22 +0300
committerGitHub <noreply@github.com>2021-08-12 16:29:22 +0300
commitcd934ba80cf182d3bafcc8a1a12c50e600832e14 (patch)
treecde69cc18cb74fbb38df11766964606143dcf1e1
parent99bcf30f7724a4bcf5f4bae0848031d9f80c4421 (diff)
parent5202df44071197e5a6049b822c73c23582ff4ef8 (diff)
Merge pull request #3656 from nextcloud/backport/3655/stable-3.3v3.3.1
[stable-3.3] Return the login name instead of user id
-rw-r--r--src/gui/wizard/flow2authwidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/wizard/flow2authwidget.cpp b/src/gui/wizard/flow2authwidget.cpp
index 901c2e991..98b6b74ed 100644
--- a/src/gui/wizard/flow2authwidget.cpp
+++ b/src/gui/wizard/flow2authwidget.cpp
@@ -113,7 +113,8 @@ void Flow2AuthWidget::slotAuthResult(Flow2Auth::Result r, const QString &errorSt
connect(fetchUserNameJob, &JsonApiJob::jsonReceived, this, [this, fetchUserNameJob, r, errorString, user, appPassword](const QJsonDocument &json, int statusCode) {
fetchUserNameJob->deleteLater();
if (statusCode != 100) {
- qCWarning(lcFlow2AuthWidget) << "Could not fetch username";
+ qCWarning(lcFlow2AuthWidget) << "Could not fetch username.";
+ _account->setDavUser("");
_account->setDavDisplayName(user);
emit authResult(r, errorString, user, appPassword);
return;
@@ -122,9 +123,10 @@ void Flow2AuthWidget::slotAuthResult(Flow2Auth::Result r, const QString &errorSt
const auto objData = json.object().value("ocs").toObject().value("data").toObject();
const auto userId = objData.value("id").toString(user);
const auto displayName = objData.value("display-name").toString();
+ _account->setDavUser(userId);
_account->setDavDisplayName(displayName);
- emit authResult(r, errorString, userId, appPassword);
+ emit authResult(r, errorString, user, appPassword);
});
fetchUserNameJob->start();
}