changing the return url after login

Topics: Customizing Orchard, Writing modules
Apr 20, 2012 at 7:31 PM

Hi:

I need to redirect the useer to a different page the first time an account is created. What is the easiest way of changing hte return url to do this?

Any help apreciated.

Regards

Sean.

Developer
Apr 21, 2012 at 5:55 PM

I don't think this is possible with the current controller dealing with this, there is no return url for registration.

Apr 21, 2012 at 5:57 PM

Ok, how would you go about taking a user to one page after they’ve registered, and another at all other times?

Cheers

Sean.

From: Piedone [email removed]
Sent: 21 April 2012 18:55
To: Sean Farrow
Subject: Re: changing the return url after login [orchard:353012]

From: Piedone

I don't think this is possible with the current controller dealing with this, there is no return url for registration.

Developer
Apr 21, 2012 at 6:06 PM

I think you should implement your own controller for registration then (and possibly register its route with a higher priority than that of the current implementation) but this is much of a hassle.

Apr 21, 2012 at 6:14 PM

I though about that, and the hassel was why I didn’t!

Any other ways round this.

Cheers

Sean.

From: Piedone [email removed]
Sent: 21 April 2012 19:06
To: Sean Farrow
Subject: Re: changing the return url after login [orchard:353012]

From: Piedone

I think you should implement your own controller for registration then (and possibly register its route with a higher priority than that of the current implementation) but this is much of a hassle.

Developer
Apr 21, 2012 at 6:29 PM

I don't think there is much simpler way. You could also try from an action filter by modifiying the http response (this is a bit hackish) or trying user events and do the same from an event handler after a registration (this is even more hackish).