Advanced redirection after login

Author Message

John Smith

Thursday 23 July 2009 10:04:21 am

I been trying to achieve the advanced redirection after login without any luck for a quite while.

http://ez.no/doc/ez_publish/technical_manual/4_0/features/advanced_redirection_after_login

It is written in the article that "advanced redirection feature will get disabled if the redirection URI is already specified (e.g. via the "LastAccessesURI" session variable.)"...

Have anybody got an idea how to make this work.

cheers,

Max Keil

Thursday 23 July 2009 5:26:30 pm

Hi John,

I tried it out and it works.

Simple 4 steps:
1. Edit the User or User Group class and define new attribute "textline"
2. Edit your group or user and set the attribute destination
3. Add the INI-Settings into site.ini.append.php
4. Clear the caches

It's already described in the article, if you trying to access a restricted area (Kernel 1 - Error), you would be redirected to it after login instead of the object-attribute-value. So you should run /user/login to check it out.

Mit freundlichen Grüßen
Best regards

Max Keil

____________________________________________________________
eZ Publish Gold Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

John Smith

Thursday 30 July 2009 4:06:21 am

I dont know mate why it not working for me......After login the user is going to the page which he/she visited last not mentioned in the user group class.

Check this:

http://ez.no/developer/forum/general/point_of_view_about_advanced_redirection_after_login

Anybody else....

André R.

Thursday 30 July 2009 4:44:21 am

You can overcome this by setting the post parameter 'RedirectURI' to '/' in your user/login.tpl template, this will make the user/login code ignore the session variable but still validate it as empty further down the code when it decides to read those pr user / user group, ref:

// Determine if we already know redirection URI.
$haveRedirectionURI = ( $redirectionURI != '' && $redirectionURI != '/' );

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

John Smith

Thursday 30 July 2009 6:44:59 am

*** Star ****, It worked!!!!

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 18 2025 22:40:21
Script start
Timing: Jan 18 2025 22:40:21
Module start 'layout'
Timing: Jan 18 2025 22:40:21
Module start 'content'
Timing: Jan 18 2025 22:40:21
Module end 'content'
Timing: Jan 18 2025 22:40:21
Script end

Main resources:

Total runtime0.7455 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 589.0547152.6250
Module start 'layout' 0.00470.0023 741.679739.4453
Module start 'content' 0.00710.7372 781.1250599.3594
Module end 'content' 0.74420.0012 1,380.484412.4688
Script end 0.7455  1,392.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4074160.0002
Check MTime0.00120.1643160.0001
Mysql Total
Database connection0.00070.091210.0007
Mysqli_queries0.678891.0493650.0104
Looping result0.00080.1029630.0000
Template Total0.714395.820.3571
Template load0.00210.281420.0010
Template processing0.712295.524920.3561
Template load and register function0.00030.035110.0003
states
state_id_array0.00110.153910.0011
state_identifier_array0.00110.141420.0005
Override
Cache load0.00180.2351290.0001
Sytem overhead
Fetch class attribute can translate value0.00060.085230.0002
Fetch class attribute name0.00170.223970.0002
XML
Image XML parsing0.01221.637830.0041
class_abstraction
Instantiating content class attribute0.00000.001770.0000
General
dbfile0.01291.7303230.0006
String conversion0.00000.000940.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
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/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: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs