CodePlexProject Hosting for Open Source Software
Hi there,
I'm very new to Orchard but not to asp.net MVC.
I need the user to submit additional information when registering to the site. For example, favorite color, etc... Normally I would store this information in a separate table and link the record with the asp.net userID.
Do I need to create a custom module for this?
I just want to double check that there is no out of the box solution for this, before coding something myself!
Thank you!
There are a few user profile modules on the gallery that you might want to try.
Made some progress.
I am using the Profile module.
It allows me to extend the 'User' ContentType with additional Parts.
I created a module in which I define a custom Part with the required additional Profile information.
This is working properly. If for example I add this part to the 'Page' content type I can see/edit my custom Part.
Also if I visit myhost/profile/admin I see my custom part information. (this comes from the profile module).
However, on the Register page only the standard fields are shown.
What I need though is that my custom information must also be filled out when registering on the site.
I am slowly becoming familiar with Orchard but I am the dark regarding how to achieve this?
Any help is greatly appreciated!
thx!
I needed something similar for a site I'm building. Unfortunately the Profile module doesn't affect the registration page, and due to various implementation details of registration it'd be hard to achieve this. So the easy thing to do is probably just to
direct users to the profile page immediately after they've registered.
Actually it's a good idea to keep registration pages as slim as possible, and make more the advanced profile optional anyway. Complex registration forms can seriously put users off!
thx for the info randompete!
In this case it is a requirement to have potential users fill out an extended registration form. The site I am working on is for a medical group and members must meet certain criteria.
I am thinking that the best approach is that I create my own registration page. Here I would register the user using the membership API's.
I have less than 5 days experience with Orchard and could really benefit from exchanging ideas with someone more experienced. If possible maybe we can Skype once so you can help me validate some ideas? If you give me a hand, you'll have a place to stay in Ecuador!
I had to create a custom registration page. It took me about two days but it works. I can probably help you if you need some more info.
I'd like to do the same, along with accepting 'terms and conditions' and being able to force a user to accept them again whenever they are updated by an admin.
In the main, I'd like to have a core set of mandatory 'sign up' information on the registration page, and then re-direct them to their profile page where they could fill out the optional profile stuff.
Let me know if you come up with anything, I'd love to know how you did it!
@GadgetGeek,
randompete was kind enough to give me some valuable advice.
You basically need to define your own module. There you can provide your own registration functionallity.
He recommended to use: OrchardSuppressDependency to override the default controller action in the Orchard.Users module
Here is a thread which explains how to use:
I have been busy with some other work, I have not started with that yet.
I hope I can get started with it today though.
Let me know how it goes, as we both will be fighting the same battle.
** EDIT **
I forgot to mention Pete suggested to derive my controller from the Account controller.
I found some time to work on this today and have got the custom registration code page working.
This is what I ended up doing:
Here is the route code:())
}
};
}
I did not end up using the OrchardSuppressDependency either.Well, hope this helps!())
}
};
}
Hi randompete!
I kindly ask you to provide example codes for the method that santiagoIT mentioned about in above posts:
(He recommended to use: OrchardSuppressDependency to override the default controller action in the Orchard.Users module)
I think that will enlighten many people struggling with register function customization like me.
Thank you very much!
OrchardSuppressDependency is just an attribute that you can put on any class in your module. As an example:
[OrchardSuppressDependency("Orchard.Core.Users.Controllers.AccountController")]
public class MyAccountController : Orchard.Core.Users.Controllers.AccountController {
// ...
}
So it's a way to swap a default implementation with one of your own.
Santiago is working on a registration page customization that renders an Edit shape for the User (see) - so that could be a path to getting a registration page that will build itself based on any parts on the User object (which would be incredibly useful!)
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.