eZ Community » Forums » Developer » Override kernel datatypes and CAS...
expandshrink

Override kernel datatypes and CAS authentication

Override kernel datatypes and CAS authentication

Friday 11 February 2011 12:27:19 pm - 4 replies

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"blunk.gif Emoticon

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.

Modified on Friday 11 February 2011 2:17:29 pm by B Pierre

Friday 11 February 2011 3:51:20 pm

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...

Friday 11 February 2011 4:18:18 pm

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" ....

Modified on Friday 11 February 2011 4:21:28 pm by B Pierre

Monday 26 September 2011 8:35:42 am

hi,

cant get it work on ezcommunity 2011.8...

when i run "ezpgenerateautoloads.php -o" the output is "... 143 classes are found ..." but 0 of them are taken to the autoload array.. (in file ezp_override.php)

always error:

 Warning:
 Class eZUser in file extension/current/kernel/classes/datatypes/ezuser/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.

any suggestions on this ?

Monday 26 September 2011 4:27:23 pm

@ Roman Hutterer

I'm not certain what the problem is but I always run this command first

./bin/php/ezpgenerateautoloads.php -e

I hope this helps

Cheers,

Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from