Use user-provided username in displayName()

This replaces `davUser()`, which is replaced by a numeric ID when using
LDAP, by the username that was actually used for logging in.

Fixes #836

Signed-off-by: Felix Eckhofer <felix@eckhofer.com>
This commit is contained in:
Felix Eckhofer 2019-09-30 17:56:14 +02:00
parent a140720901
commit ace142bb23
No known key found for this signature in database
GPG key ID: B4543DCDE458BF73

View file

@ -119,7 +119,7 @@ void Account::setAvatar(const QImage &img)
QString Account::displayName() const
{
QString dn = QString("%1@%2").arg(davUser(), _url.host());
QString dn = QString("%1@%2").arg(credentials()->user(), _url.host());
int port = url().port();
if (port > 0 && port != 80 && port != 443) {
dn.append(QLatin1Char(':'));