How to fix a user account screwed up by El Capitan? I did a full backup before installing El Capitan, so a restore is available if nothing else.

After the install, I was able to login, but found that the 
login group for my non-admin account had been changed from staff (20) to wheel (0).  

Looked around for a way to fix it and could not find anything but chfn.  I suspected that would only affect files in /etc and not LDAP, but tried it anyway.  'id' showed it worked, but access to apps was not restored.  Logged out, and could not log in.  Account still shows in login screen but password gets the "headshake" signal.

Logged in to admin account, unlocked the users pref pane, selected the account, put in the password again, and then tried  'id wgroleau' in Terminal.  "No such user"

The account is still shown on the login screen and the pref pane, but trying to reference it in terminal with various commands gets "no such user."

Any fix other then restoring Yosemite?
Here's one way to fix (but I hope there's a better way):


In admin account, 

sudo (cd /Users; tar cf  )
In Users pref pane, delete the account and the directory.  (Trying to keep the directory got an error and did not delete account)
Re-create the account.  Verify in Terminal that the numeric ID is the same.
Restore the directory contents from the tarball.
If necessary, use chown/chgrp/chmod to fix metadata.


I also hope (too late for me) that someone can explain how it could have been prevented.