What I suggested doesn't cover the user change scenario, but typically this is a system admin function - in that, a sys admin is responsible for migrating user settings and documents over to the new user account.

Programs are usually not required to deal with that, unless the spec explicitly states that they do (and even then I would discuss with the pm whether you want to try to solve a problem that really can't be cleanly solved). If a sys admin does it, they know the old user name, they know the new user name, and can easily migrate all the documents and settings providing you following the rules on where to put application data and user data.