Override kernel datatypes and CAS authentication

Author Message

B Pierre

Friday 11 February 2011 3:27:19 am

Hi

I try to override kernel datatypes to make a CAS authentication but it's doesn't work. First I have create an extension with this arborescence :

ezCAS -> settings -> content.ini.append.php
-> kernel -> classes -> datatypes -> ezuser -> ezuser.php

My file "content.ini.append.php" contains this lines :

"

[DataTypeSettings]
RepositoryDirectories []
RepositoryDirectories []=extension/ezCAS/kernel/classes/datatypes

"

Next I have modify the "config.php-RECOMMENDED" as this :

"

/*
KERNEL OVERRIDES
----------------
This setting controls if eZ Publish's autoload system should allow, and
load classes, which override kernel classes from extensions.
*/
define( 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE', true );

"

(I have uncomment and replace "false" with "true")

To finish I have execute this commands :
php bin/php/ezpgenerateautoloads.php -o
php bin/php/ezpgenerateautoloads.php

But I have this error message :

"

Warning:
Class eZUser in file extension/ezCAS/kernel/classes/datatypes/ezuzerCAS/ezuser.php is already defined in:
kernel/classes/datatypes/ezuser/ezuser.php (autoload/ezp_kernel.php)
This class was not added to the autoload array.

"

What's wrong ?

I have used this topic http://share.ez.no/forums/developer/override-kernel-classes

eZ Version : 4.3

Thanks for your help.

Gaetano Giunta

Friday 11 February 2011 6:51:20 am

Why don't you just use a custom sso handler / logon handler instead? Also there are at least 2 working cas extensions on projects.ez.no...

Principal Consultant International Business
Member of the Community Project Board

B Pierre

Friday 11 February 2011 7:18:18 am

The two cas extensions not working ^^

More exactly one modify directly the kernel classes and the second makes a php error.

I've solved my problem, its necessary rename "config.php-RECOMMENDED" in "config.php" ....

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 05:06:57
Script start
Timing: Jan 18 2025 05:06:57
Module start 'layout'
Timing: Jan 18 2025 05:06:57
Module start 'content'
Timing: Jan 18 2025 05:06:57
Module end 'content'
Timing: Jan 18 2025 05:06:57
Script end

Main resources:

Total runtime0.7960 sec
Peak memory usage4,096.0000 KB
Database Queries58

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.0469152.6406
Module start 'layout' 0.00620.0036 740.687539.4844
Module start 'content' 0.00980.7848 780.1719545.5625
Module end 'content' 0.79460.0013 1,325.734412.1250
Script end 0.7959  1,337.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3998160.0002
Check MTime0.00140.1734160.0001
Mysql Total
Database connection0.00140.180310.0014
Mysqli_queries0.739592.9049580.0127
Looping result0.00070.0818560.0000
Template Total0.758895.320.3794
Template load0.00200.247120.0010
Template processing0.756995.089820.3784
Template load and register function0.00020.029910.0002
states
state_id_array0.00150.183710.0015
state_identifier_array0.00100.121320.0005
Override
Cache load0.00170.2139430.0000
Sytem overhead
Fetch class attribute can translate value0.00080.095920.0004
Fetch class attribute name0.00180.222340.0004
XML
Image XML parsing0.00070.090020.0004
class_abstraction
Instantiating content class attribute0.00000.001940.0000
General
dbfile0.00080.1015160.0001
String conversion0.00000.001640.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
3content/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
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs