Revert "Drop reset_userdir."

This reverts commit a12ca37b05c74f88d1088f2f77cc9e257110aaf9.