Merge pull request #5444 from nextcloud/bugfix/useProperUserIdForEditLocally

fix edit locally job not finding the user account: wrong user id
This commit is contained in:
Matthieu Gallien 2023-02-17 11:21:56 +01:00 committed by GitHub
commit ec7fd9542c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,15 +163,7 @@ QString Account::displayName() const
QString Account::userIdAtHostWithPort() const
{
const auto credentialsUserSplit = credentials() ? credentials()->user().split(QLatin1Char('@')) : QStringList{};
if (credentialsUserSplit.isEmpty()) {
return {};
}
const auto userName = credentialsUserSplit.first();
QString dn = QStringLiteral("%1@%2").arg(userName, _url.host());
QString dn = QStringLiteral("%1@%2").arg(_davUser, _url.host());
const auto port = url().port();
if (port > 0 && port != 80 && port != 443) {
dn.append(QLatin1Char(':'));