From ef45c755f6b7bf97801c52b504977367c2ad46fb Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 8 Dec 2022 10:50:18 +0200 Subject: [PATCH] kdepasswd: set the accountservice email Signed-off-by: Ivailo Monev --- kdepasswd/kcm/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kdepasswd/kcm/main.cpp b/kdepasswd/kcm/main.cpp index 5063ecce..909d1f1b 100644 --- a/kdepasswd/kcm/main.cpp +++ b/kdepasswd/kcm/main.cpp @@ -220,6 +220,18 @@ void KCMUserAccount::save() KMessageBox::error(this, i18n("There was an error setting the name: %1", name)); } } + + if ( _mw->leEmail->isModified() ) { + // save e-mail with accountsservice + const QString email = _mw->leEmail->text(); + const bool result = setASProp( + this, qlonglong(_ku->uid()), + QString::fromLatin1("SetEmail"), email + ); + if (!result) { + KMessageBox::error(this, i18n("There was an error setting the Email: %1", email)); + } + } #endif /* Save the image */