Share » Forums » Setup & design » [Resolved] Redirect after login problem

[Resolved] Redirect after login problem

[Resolved] Redirect after login problem

Thursday 28 August 2008 5:32:20 am - 2 replies

Modified on Thursday 28 August 2008 2:16:11 pm by David Cuel-Oller

Author Message

David Cuel-Oller

Thursday 28 August 2008 6:02:32 am

A reply to myself !

I hacked into the /kernel/user/login.php and around line 197 :
if ( is_object( $user ) && !$haveRedirectionURI )

Modifiied for :
if ( is_object( $user ) )

I think it force redirectURL to be the user's one (if any) !

Works just fine ! Now user is ever redirected to its own page.

Any comments ?

Regards,

David

Maxime Thomas

Tuesday 02 December 2008 10:57:06 pm

Hi,

I understand that you are proud to have found a solution to your issue but hack the kernel is a very very very very bad habit ! The main reason is that the day you will update your ez instance, you will have to hack again the kernel...

As far as I remember, in the login.tpl file you can put an hidden input called RedirectAfterLogin and its value is the correct URL where you want your user to go. As it's in the template you can generate it...

Max

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu