Assign a default role when using "Register" page

Topics: Customizing Orchard, General
Jun 9, 2011 at 10:10 AM

Basically, I want to be able to assign a Role to a user when they use the Register functionality that is currently available in Orchard 1.1.  I have created a new role which I'd like the users to default too, but I'm struggling to do this from code.  Any pointers?

Jun 9, 2011 at 10:49 AM

I found this post and it help loads:

Jun 9, 2011 at 11:07 AM
Edited Jun 9, 2011 at 11:07 AM

Also you can implement IUserEventHandler to handle Creating and Created events and set the roles at that time.

And look at Santiago's module for extending the registration page:

Jun 10, 2011 at 8:50 AM

Excellent find.  Thanks RandomPete!