This project is read-only.

Assign a default role when using "Register" page

Topics: Customizing Orchard, General
Jun 9, 2011 at 11: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 11:49 AM

I found this post and it help loads:

Jun 9, 2011 at 12:07 PM
Edited Jun 9, 2011 at 12:07 PM

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 9:50 AM

Excellent find.  Thanks RandomPete!