Forums / Install & configuration / How to set minimum length of user passwords??
Massimiliano Bariola
Tuesday 13 December 2005 10:32:03 am
Hi,
due to privacy laws, I need to be able to configure eZ publish so that the minimum length of user passwords will be 8 characters.
Unfortunately, I cannot find any configuration setting which will do that. any help?
Paul Forsyth
Tuesday 13 December 2005 10:40:33 am
There is no setting.
But you could easily modify:
kernel/classes/datatypes/ezuser/ezusertype.php
to do this.
In that file this line is present:
if ( strlen( $password ) < 3 )
so you should be able to change the '3' to be an ini setting instead.
Paul
Tuesday 13 December 2005 11:07:39 am
Hi Paul,
I found I need to change it also in ezuser.php and kernel/user/password.php .
I also submitted an enhancement suggestion for future versions, so as not to hack the kernel.
thanks!
Tuesday 13 December 2005 11:46:53 am
Yes, i see it in those places now. I also agree this enhancement should be in the kernel.
Its not only a useful feature but having 'strlen ($password < 3)' in three locations in the code shouldnt happen.