Extended registration information NOT stored in Orchard: howto?

Topics: Customizing Orchard, Writing modules
Mar 8, 2013 at 10:09 PM
Edited Mar 10, 2013 at 10:42 PM
For a new project I need to extend Orchard.

This project needs an extended registration procedure. Next to the login & password, I also need to ask client information (name, address, ...).

This information should NOT be stored in Orchard, but in the database used by our accounting application. When clients are added, they get an id. This id should then be stored in Orchard together with the user.

I installed the modules 'Contrib.Profile' and 'itWORKS.ExtendedRegistration' to see how they get things done. I also saw it's possible to plug in a custom IMembershipProvider.

Still, I'm not sure on how to tackle this problem. My experience with Orchard is too limited at this point.

How should I store the ClientId? Should I just add it as a field in the 'User' content type?

Since Orchard doesn't need to know about the extra client information, I think the easiest way to handle registration is to map 'Users/Account/Register' to a custom controller using a higher priority, right? Much like the second module does. Can I create a model that is a mix of Orchard data (login, password) and data that Orchard knows nothing about (name, address)?

Any guidance is much appreciated.
Mar 9, 2013 at 1:03 PM
take a look at the video from harvest conference
http://www.youtube.com/watch?v=MH9mcodTX-U

(skip to minutes > 50 ) using activating filter to inject a part to the existing user shape.
Mar 9, 2013 at 9:22 PM
Thanks. I will take a look, see if it can get me going.

What about the ClientId itself? Should I just add it as a field in the 'User' content type?
Mar 10, 2013 at 7:46 AM
for me, to integrate with data from an external repository i would
  1. create my custom part with the properties it needs to hold
  2. use handlers to open my custom service and inject its values to my parts properties
  3. weld my part to the content type i want (user in your case)
see here as well :
http://stackoverflow.com/questions/4727843/how-to-change-orchard-record-repository