I have recently built something like this for a project. I would suggest that you do this:
- only build the functionality into a module : don't try and modify the core source.
- only create the folder when you actually need it (it is trivial to build a routine to create the folder if it does not exist)
- don't use the userid for the folder : use the username instead. It is guaranteed unique by the system, same as the userid. This will make it much easier to track down problems, lost folders, etc. It will also make sorting through the structure on the server a lot easier.
- remember if you're storing securable items, then create your folders as secure folders in DNN. You'll need to mess about a bit with this. But otherwise it's trivial to get the contents of your users folder. I can just go into site.com/portals/0/users/username and find whatever I want, even if by trial and error.
If you really need the folder created after registration, just put an auto-folder creation module on the page that the registration forwards to. But it's easier to just create the folder as and when you need it. That way you don't clutter your server with unnecessary empty folders.