Skip to content

Commit

Permalink
Merge pull request #3656 from nextcloud/backport/3655/stable-3.3
Browse files Browse the repository at this point in the history
[stable-3.3] Return the login name instead of user id
  • Loading branch information
mgallien authored Aug 12, 2021
2 parents 99bcf30 + 5202df4 commit cd934ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/wizard/flow2authwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}
Expand Down

0 comments on commit cd934ba

Please sign in to comment.