A module that allows user to create content anonymously, then if they register, assigns the content to them
You should use Create and Register module.


  This module creates a "lazy registration" which means that the user creates the content first and after this logs in or registers to the site.