How to automate login for restricted area ?

Author Message

Vitaly Puzrin

Thursday 13 April 2006 7:45:23 am

Hi all.

At my site, we use external autentification (from forum base) with custom loginhandler, placed in extention.

So, when user goes to restricted area, he is asked to enter the same login/password, from invision power board accout.

The Idea is to simplify this prosess, because we have access to forum cookies. I'd like to have compleately transparent authentification, if user is logged into forum. Without additional login dialog for EZ.

Does anybody know how to do it properly ?

We've tryed to insert custom operator (wich implement autologin) in the begining of pagelayout.tpl. But the problem is, that module content is rendered BEFORE autologin operator runs. So, when user goes to protected area, he get "access error" in the first time.

How to solve such problem?

(*) We'd like co call autologin only for restricted area, now for all site pages.

Ɓukasz Serwatka

Monday 17 April 2006 11:43:32 pm

Hi,

Take a look at this contribution, it contains some ideas.
http://ez.no/community/contribs/hacks/cookie_user

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

Main resources:

Total runtime1.2589 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 589.1797152.6406
Module start 'layout' 0.00610.0030 741.820339.4766
Module start 'content' 0.00901.2486 781.2969525.5703
Module end 'content' 1.25760.0013 1,306.86728.2813
Script end 1.2589  1,315.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2659160.0002
Check MTime0.00140.1074160.0001
Mysql Total
Database connection0.00050.042510.0005
Mysqli_queries1.217596.7093540.0225
Looping result0.00050.0397520.0000
Template Total1.227197.520.6136
Template load0.00220.171020.0011
Template processing1.225097.303320.6125
Template load and register function0.00010.009510.0001
states
state_id_array0.00070.059210.0007
state_identifier_array0.00110.086420.0005
Override
Cache load0.00180.1397160.0001
Sytem overhead
Fetch class attribute can translate value0.00080.064420.0004
Fetch class attribute name0.00090.068330.0003
XML
Image XML parsing0.00060.051220.0003
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00080.0611180.0000
String conversion0.00000.000840.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs