Forums / Setup & design / Advanced redirection after login

Advanced redirection after login

Author Message

Lydie Soler

Wednesday 10 August 2005 9:03:41 am

Hi I have seen this article for ez 3.8

3.8 features

We have been working on some small new features for eZ publish 3.8.
Advanced redirection after login

You can now configure where to redirect a user when he/she logs in. This is done through an attribute in either the user or the group object. What attribute to use is controlled through an ini setting

[UserSettings]
LoginRedirectionURIAttribute[class_identifier]=attribute_identifier

THis is exactly what I would like to do.... Is it possible to do something like this with ez 3.6?

Where is the parameter telling the redirection page (by default the root folder)

Lydie Soler

Thursday 11 August 2005 7:15:53 am

to be more precise here is my problem in detail.
In a template I call the template displaying the login page.
Once a user logs in it is redirected to what seems to be the node 2 (regarding what is displayed) but the url is : http://metarisk2/metarisk2/index.php/site_unite_metarisk/content/view/full/bg.jpg

and I would like to change that... THe login page is displayed trying to access a specific folder. I though that once logged the user would be redirected to the folder's page....

I have this in my error.log...

[ Aug 11 2005 16:10:09 ] [10.75.2.21] Timing Point: Script start
[ Aug 11 2005 16:10:09 ] [10.75.2.21] Undefined module: bg.jpg
[ Aug 11 2005 16:10:09 ] [10.75.2.21] Error ocurred using URI: /metarisk2/index.php/bg.jpg
[ Aug 11 2005 16:38:46 ] [10.75.2.21] Timing Point: Module start 'user'
[ Aug 11 2005 16:38:46 ] [10.75.2.21] Error ocurred using URI: /metarisk2/index.php/site_unite_metarisk/user/bg.jpg
[ Aug 11 2005 16:38:56 ] [10.75.2.21] Timing Point: Script start
[ Aug 11 2005 16:38:56 ] [10.75.2.21] Undefined module: bg.jpg
[ Aug 11 2005 16:38:56 ] [10.75.2.21] Error ocurred using URI: /metarisk2/index.php/site_unite_metarisk/bg.jpg
[ Aug 11 2005 16:39:01 ] [10.75.2.21] Timing Point: Module start 'user'
[ Aug 11 2005 16:39:01 ] [10.75.2.21] Error ocurred using URI: /metarisk2/index.php/site_unite_metarisk/user/bg.jpg
[ Aug 11 2005 16:39:01 ] [10.75.2.21] Timing Point: Module start 'content'
[ Aug 11 2005 16:39:01 ] [10.75.2.21] Unknown template variable 'site_access' in namespace ''

I think I am missing something... Thanks for your help

Lydie Soler

Friday 12 August 2005 3:02:20 am

well after 3 days searching here is the solution:

you have to check different things:

- in the menu setup/global settings
change Index Page and Default Page replacing the default 2 node by your node number

- also check the same elements in your different site.ini.append.php

and then it should work!

Hope this will help someone ;)

Lydie Soler

Friday 12 August 2005 9:48:42 am

hm.... weird, it doesn't work any more....
Maybe another cache pb...

So here is the final solution...

in the login.tpl(or your corresponding override)
I replace

<input type="hidden" name="RedirectURI" value="{$User:redirect_uri|wash}" />

by

<input type="hidden" name="RedirectURI" value="content/view/full/163" />

I know it's very bad..... if anyone has a better solution, thanks very much for telling me

David Eriksson

Monday 15 August 2005 12:29:21 am

Be sure that IndexPage and DefaultPage are still correct set. If you change and save the "global settings" from the admin interface, eZ writes a lot of things to the settings/override/site.ini.append.php, among other things IndexPage, DefaultPage, DebugIPs, etc. Since we have our index and defaultpages set differently for each siteaccess, saving global settings causes them to be set as empty in override, disrupting all websites.

/David