Search code examples
phpiniezpublish

eZ Publish Unable to override [UserSettings] in site.ini.append.php


I am having trouble overriding [UserSettings] in the site.ini.append.php.

[UserSettings] MaxNumberOfFailedLogin=5

I am aware of this topic : http://share.ez.no/forums/setup-design/ini-settings-override-order which describe how to override ini files in eZ.

In the admin : http://s21.postimg.org/fcxj682yv/admin.jpg it says that the settings is override with 5.

But when i am using the ezuser class with eZUser::maxNumberOfFailedLogin(); to get the MaxNumberOfFailedLogin it always says '0' !

If i change the settings/site.ini directly (which is not recommanded) it is working.

Isn't the ezuser class aware of the overriding system of eZ Publish ? What should i do ?

Thanks for help. Cheers.


Solution

  • Found a way to do otherwise :

    As the eZUser class is using the eZINI class to get properties in the site.ini file, in order to get overrided properties, instead of using eZINI::instance(); you have to set eZINI::instance('site.ini.append.php', 'settings/override'); with the overrided file.

    This way you can use overrided conf.

    Only problem, you will have to call eZINI each time you need an overrided conf. (in this case for eZUser).