|
Having done this quite extensively (creating some sort of hybrid mess) with one of our module then yes it is possible. But that was mostly done between Orchard 0.9 and 1.1 and kept going with our business logic to the current 1.6 version. Im curious now
if I could just replace it completely with something more simple now I know my way around a lot better.
In its simplest you should be able to create an alternate of the login shape and change the route that is created for the form post. Re-render the login shape if that fails validation or something in the controller. Hmm here we've created our own shape rather
than an alternate, maybe that wasn't possible when I created my module (I'll try checking if that is possible again some point) .
Our main problem to get around was to login with just a email - just a subscription kind of thing, then feeding them passwords only if they needed access to admin areas / restricted areas. Similarly changing the views for when a person registers but without
a password etc.
You can change the default un-authorized url in the Orchard.Web Web.config file:
<authentication mode="Forms">
<forms loginUrl="~/Users/Account/AccessDenied" timeout="2880"/>
</authentication>
Provide your own route if you like. Our module create a simple one: "~/Login". 99% Ive just kept it as above, as if they are unauthorized they are likely requiring access which doesn't need custom logic, but follow the default one ie to the admin
or a section of admin. The rest of the work would be changing links and things in the themes and possibly any profile modules to your login path.
I'm curious of your scenario though. What are you trying to achieve that isn't there with the default login / register views?
Hope that gets you started at least.
Matt
|