Просмотр исходного кода

fix edit locally job not finding the user account: wrong user id

the only correct id for an user is Account::_davUser

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Matthieu Gallien 3 лет назад
Родитель
Сommit
24fc49f99d
1 измененных файлов с 1 добавлено и 9 удалено
  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(':'));