You need to sign in to do that
Don't have an account?
Customer Community user changing profile photo for another user
Using Visualforce and Apex, is it possible to allow a user with the Customer Community User license to change the profile photo for another user having the same license? For example, let's say Adam and Frank are both community users. I want to enable Adam to log into the community, then change the profile picture for Frank.
Right now, I'm trying to use ConnectApi.ChatterUsers.setPhoto() (https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_ConnectAPI_ChatterUsers_static_methods.htm#apex_ConnectAPI_ChatterUsers_static_methods), but I'm getting an error: Insufficient Privileges: You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
The relevant code snippet is shown below:
ConnectApi.ChatterUsers.setPhoto( MyNeds.getNetworkId(), getCommunityUser().Id, photoInput);