Point of view about Advanced Redirection after login

Author Message

Pascal France

Thursday 22 November 2007 8:26:03 pm

Hi,

About the <i>Advanced Redirection after login</i> I thing someting could be done to obtain a nicer behavior.
Currently, the <i>Advanced Redirection after login</i> mechanism only redirects the user to the customised redirection page if he comes from the home page (I mean, if there is no <i>LastAccessesURI</i>).

I know two ways to avoid this behavior:

1°/ by commenting out these lines in the kernel/user/login.php file (dirty solution):

71    /* if ( trim( $userRedirectURI ) == "" )
72     {
73         // Only use redirection if RequireUserLogin is disabled
74         $requireUserLogin = ( $ini->variable( "SiteAccessSettings", "RequireUserLogin" ) == "true" );
75         if ( !$requireUserLogin )
76         {
77             if ( $http->hasSessionVariable( "LastAccessesURI" ) )
78                 $userRedirectURI = $http->sessionVariable( "LastAccessesURI" );
79         }
80
81         if ( $http->hasSessionVariable( "RedirectAfterLogin" ) )
82         {
83             $userRedirectURI = $http->sessionVariable( "RedirectAfterLogin" );
84         }
85     }*/

2)/ by adding a "log in" link only in the home page.

My opinion is that most often if we use private access it is in order to display pages that are not showed in the public site. And, in the other side, we can be not interrested to display the public pages in the private side of the site.
So, with the currently and default behavior, if the user comes from any page of the site (other than the home page) he will get an error message once logged in (because the page where it came from should not be displayed in the private part).

Therefore I wonder if it wouldn't be better to add a test in the login.php file. Something like that:

"if LoginRedirectionUriAttribute[group]= is used in site.ini.append.php then always use this advanced redirection". Or anything else like that.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

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 19:09:46
Script start
Timing: Jan 18 2025 19:09:46
Module start 'layout'
Timing: Jan 18 2025 19:09:46
Module start 'content'
Timing: Jan 18 2025 19:09:46
Module end 'content'
Timing: Jan 18 2025 19:09:46
Script end

Main resources:

Total runtime0.5838 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.0391152.6406
Module start 'layout' 0.00500.0028 740.679739.4922
Module start 'content' 0.00780.5742 780.1719438.5781
Module end 'content' 0.58200.0018 1,218.75008.1250
Script end 0.5837  1,226.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5654160.0002
Check MTime0.00130.2171160.0001
Mysql Total
Database connection0.00070.126210.0007
Mysqli_queries0.540892.6355460.0118
Looping result0.00050.0824440.0000
Template Total0.551294.420.2756
Template load0.00190.325120.0009
Template processing0.549394.089620.2746
Template load and register function0.00030.047610.0003
states
state_id_array0.00090.162110.0009
state_identifier_array0.00080.144320.0004
Override
Cache load0.00160.2696160.0001
Sytem overhead
Fetch class attribute can translate value0.00070.123710.0007
Fetch class attribute name0.00080.144710.0008
XML
Image XML parsing0.00010.018910.0001
class_abstraction
Instantiating content class attribute0.00000.000910.0000
General
dbfile0.00060.1070100.0001
String conversion0.00000.001240.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs