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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 01:13:30
Script start
Timing: Jan 19 2025 01:13:30
Module start 'layout'
Timing: Jan 19 2025 01:13:30
Module start 'content'
Timing: Jan 19 2025 01:13:31
Module end 'content'
Timing: Jan 19 2025 01:13:31
Script end

Main resources:

Total runtime0.6409 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 589.1797152.6250
Module start 'layout' 0.00860.0029 741.804739.4453
Module start 'content' 0.01150.6277 781.2500531.2969
Module end 'content' 0.63930.0015 1,312.546912.1563
Script end 0.6408  1,324.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4861160.0002
Check MTime0.00130.2003160.0001
Mysql Total
Database connection0.00250.391710.0025
Mysqli_queries0.579390.3916630.0092
Looping result0.00060.1011610.0000
Template Total0.603394.120.3016
Template load0.00210.327920.0011
Template processing0.601193.803120.3006
Template load and register function0.00030.040910.0003
states
state_id_array0.00090.135310.0009
state_identifier_array0.00120.185220.0006
Override
Cache load0.00180.2835400.0000
Sytem overhead
Fetch class attribute can translate value0.00120.182720.0006
Fetch class attribute name0.00100.161250.0002
XML
Image XML parsing0.00050.073020.0002
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00080.1174100.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs