[KAccounts] [Bug 414219] Empty Google username after successful login

Wolfgang Bauer bugzilla_noreply at kde.org
Tue Feb 18 09:21:47 GMT 2020


https://bugs.kde.org/show_bug.cgi?id=414219

--- Comment #21 from Wolfgang Bauer <wbauer at tmo.at> ---
I looked a bit more into this now.
This is the code that sets the account name (in
kaccounts-integration/src/jobs/createaccount.cpp, line :
 if (m_account->displayName().isEmpty()) {
     m_account->setDisplayName(info.userName());
 }

info.userName() is an empty string here, and that breaks things.

But, this is only used for display purposes, not for the actual
authentification (that's why the workaround in comment#18 actually works). So
we could just use any other string here to fix this bug.

Proof-of-Concept "patch":
sed -i
's/m_account->setDisplayName(info.userName());/m_account->setDisplayName(QString("Account%1").arg(info.id()));/'
src/jobs/createaccount.cpp
That would set the account name to "Account123" or similar.
(or maybe use QString("%1%2").arg(info.caption().arg(info.id()), that would
give something like "google123" ;-) )

Of course one could also only do that if info.userName() is actually empty as
well (i.e. what I suggested in comment#17).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kde-telepathy-bugs mailing list