Custom User Controller Extension - to allow users to edit fields on user record
[update : captains log june 18 2020. summer20 release. its a lot easier to use a flow that runs in system mode to do most anything that requires a without-sharing apex controller]
As custom controllers can run in system mode, unencumbered by such niceties as security restrictions, I reasoned that I could pull together a custom visualforce page that users could go to which would allow them to set the values of fields on their own user records, that otherwise they would not have access to. I cannot say that this is definitely a good idea. I am not a coder and did a lot of reading, guessing, and borrowing to bring this code to life. To see the final product, go to this link
A couple of books I can recommend are The Visualforce Cookbook by Keir Bowden and Development with the Force.com Platform by Jason Ouellette
I went for an extension on the User object, because it seemed to make...