User Provision/Registration In Orchard

Topics: Customizing Orchard, Writing modules
Nov 30, 2011 at 1:14 PM

Hi,

I am very much new to orchard and successfully created a module and a custom theme. The documentation really helped me.

Right Now I have a Page (SingIn.cshtml) in my module. This page includes Registration and Login

My Question are.

1- How I will be able to redirect the user to SingIn.cshtml page for Login Purpose, Which Web.Config I should change so that the controller Action with [Authorize] Tag Redirect to SingIn.cshtml

2- How to add Login and Registration Feature in my SingIn.cshtml. I know that there is a module with the name of ORCHARD.USERS but I cannot use that for Registration Purpose. I want the registration and login to be done from SingIn.cshtml

3- If there is a better way to handle this then please suggest me.

Your suggestions/help will be highly appreciated.

Regards

Nov 30, 2011 at 2:31 PM
Edited Nov 30, 2011 at 2:31 PM

Please
Can some one say something about this issue?

Nov 30, 2011 at 2:41 PM

The question is, why can't you use Orchard.Users? You should probably be looking at how to extend that rather than completely reinventing the wheel.

Nov 30, 2011 at 2:48 PM
Edited Nov 30, 2011 at 2:56 PM

Thanks for your response.


I agree with you, I also prefer the build in Orchard.Users

But

Its the requirements from Client End to Use a specific page for Sign In and Sign Up, The client do not want the application to redirect to Orchard.Users Login Page, He want to have a custom login page.

Please share the link/article for extending the Orchard.Users Module.

 

Regards

Nov 30, 2011 at 3:00 PM

If all you want to do is change the .cshtml of those pages, you can simply override them. To do this, copy the templates as follows:

- LogOn.cshtml and Register.cshtml from Orchard.Users/Views to [YourTheme]/Views

- Everything from Orchard.Users/Views/Account to [YourTheme]/Views/Orchard.Users/Account

(LogOn.cshtml and Register.cshtml are shapes, but all the other files are normal MVC views, which is why the override locations are different)

Now you have a copy of all the relevant files so you can make any changes directly in your theme.

If you want to override the actual behaviour of a specific page it gets more tricky, but again tell us exactly what you want to do, there's already a module available for registration customisation which might help you.

Nov 30, 2011 at 3:15 PM
Edited Nov 30, 2011 at 3:16 PM

In My Registration Page, I need Following Fields
--Full Name:
--Email:
--Password:
--Confirm Password:
--Check Box For I agree to the Terms Of Use/Privacy Statement
--Already a Member Link (that will redirect to My Login Page)



In Orchard.Users Registration following fields are available
-Username:
-Email:
-Password:
-Confirm password:

So In this case I want to
-Remove Username
-Add FullName
-Add Check Box For I agree to the Terms Of Use/Privacy Statement
-Add Already a Member Link

Using Orchard.Users How I will be able to do this?

Nov 30, 2011 at 3:42 PM

There's an ExtendedRegistration module available, which allows you to bolt extra parts onto the registration page (by adding them to the User content type)

Nov 30, 2011 at 6:30 PM
Edited Nov 30, 2011 at 6:30 PM

Thanks a lot for your help.