Compatible with eZ Publish 4.1 and later versions.
Update the eZ Publish database by running
$ mysql -u<username> -p<password> <ezdatabase> -P<port> < extension/ezmbpaex/sql/install/mbpaex.sql
in the command line from the root of your eZ Publish installation.
The default settings in extension/ezmbpaex/settings/mbpaex.ini (or an override) must be customized as follows:
[mbpaexSettings] # Regular expression used for password validation when # none is defined in the contentobject PasswordValidationRegexp= # Default lifetime for password in DAYS # 0 means no limit (passwords never expire) DefaultPasswordLifeTime=0 # Number of seconds before password expiration to send a # mail notification to the user # Default 172800 (2 days) ExpirationNotification=172800 # Number of seconds that the forgot password generated hash will be valid # Default 86400 (1 day) ForgotPasswordHashLifeTime=86400 # Login of the eZ user used in the updatechildren cronjob, must have access to # read the Users section. UpdateChildrenUser=admin
Enable the extension in "site.ini.append(.php)" in the /settings/override folder of your eZ Publish installation.
In "site.ini.append(.php)" you must add "ActiveExtensions[]=ezmbpaex" to the block [ExtensionSettings]. It will then most likely look like this:
[ExtensionSettings] ActiveExtensions[]=ezoe ActiveExtensions[]=ezodf ActiveExtensions[]=ezwebin ActiveExtensions[]=ezmbpaex
To prevent a user, whose password has expired, from having undesired access to default user module views which are not effected by the password expiration settings, you should only enable users to access the views you need them to. All standard views will then get access denied. These changes should be added to the global override of site.ini: (Note: these adjustments can be done in the site.ini of you eZ Publish installation as well as in the site.ini of ezmbpaex.)
[SiteAccessSettings] AnonymousAccessList[] AnonymousAccessList[]=user/success AnonymousAccessList[]=user/activate AnonymousAccessList[]=userpaex/password AnonymousAccessList[]=userpaex/forgotpassword [RoleSettings] PolicyOmitList[] PolicyOmitList[]=user/login PolicyOmitList[]=user/logout PolicyOmitList[]=userpaex/password PolicyOmitList[]=userpaex/forgotpassword
$ php bin/php/ezpgenerateautoloads.php --extension