Przeglądaj źródła

Merge pull request #5444 from nextcloud/bugfix/useProperUserIdForEditLocally

fix edit locally job not finding the user account: wrong user id
Matthieu Gallien 3 lat temu
rodzic
commit
ec7fd9542c
1 zmienionych plików z 1 dodań i 9 usunięć
  1. 1 9
      src/libsync/account.cpp

+ 1 - 9
src/libsync/account.cpp

@@ -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(':'));