Bug 360005

Summary: User Manager avatar setting changes current user only
Product: [Unmaintained] user-manager Reporter: Leszek Lesner <leszek.lesner>
Component: kcontrol moduleAssignee: Jonathan Riddell <jr>
Status: RESOLVED FIXED    
Severity: normal CC: sergei.chernikov
Priority: NOR    
Version: 5.5.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: My attempted Patch

Description Leszek Lesner 2016-03-02 19:16:32 UTC
Changing the avatar for another user changes actually the avatar for the current user. 

Reproducible: Always

Steps to Reproduce:
1. Click on different user or create new user account
2. Change its avatar image
3. Hit Apply

Actual Results:  
It always changes the avatar image of the current user instead of the choosen user. 

Expected Results:  
Change avatar of the selected user

I tried to work on a solution however this one only works if the current user has permissions to write to the choosen users directory and overwrite the .face and .face.icon file. 
Maybe those files need to be created with root/superUser rights. 

See: https://paste.kde.org/pmlwp0tre
Comment 1 Leszek Lesner 2016-03-02 19:19:09 UTC
Created attachment 97642 [details]
My attempted Patch

Added my attempt to patch this. 
Maybe instead of trying to write we should simply show an error message or info dialog that the user needs to execute user-manager under the other accounts user to actually change this particular avatar image.
Comment 2 sergei.chernikov 2016-10-19 21:02:13 UTC
Reproduced in plasma 5.8.2
Comment 3 David Edmundson 2017-01-13 15:27:11 UTC
Git commit 0d43e0379a16fe5f2c58a69ff2db1cf14c28197e by David Edmundson.
Committed on 13/01/2017 at 15:27.
Pushed by davidedmundson into branch 'Plasma/5.9'.

When updating another user's avatar don't save icon into our home

Summary:
We want to save the face using AccountsService, but for backwards
compatibility we also save the icon into ~/.face for old
apps/DisplayManagers that still expect that.

This works when setting a face as the current user, but doesn't make
sense when setting the icon of another user.

We can't fix it to write into another user's home, so instead of trying
just skip that step and only update AccountsService.
Related: bug 365662, bug 371663

Test Plan:
Changed my user's avatar. AccountsService updated ~/.face updated

Changed another user's avatar from my account. Accounts service updated, ~/.face was
unchanged

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D4036

M  +25   -14   src/accountinfo.cpp

https://commits.kde.org/user-manager/0d43e0379a16fe5f2c58a69ff2db1cf14c28197e