diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-10 17:18:16 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-10 17:18:16 +0000 |
commit | 38cf151563563dd8f5fe8b5dbcda1d800997d9f6 (patch) | |
tree | 2b6992e05951e134f9f655479a2fad78f89de9f3 /engine | |
parent | 29b4b91a9a220bd462eab6320cf16a2ddf4be112 (diff) | |
download | elgg-38cf151563563dd8f5fe8b5dbcda1d800997d9f6.tar.gz elgg-38cf151563563dd8f5fe8b5dbcda1d800997d9f6.tar.bz2 |
using config variable for minimum password length
git-svn-id: http://code.elgg.org/elgg/trunk@7047 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/users.php | 4 | ||||
-rw-r--r-- | engine/settings.example.php | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index c9add2541..45499b27d 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -953,7 +953,9 @@ function validate_username($username) { * @throws RegistrationException on invalid */ function validate_password($password) { - if (strlen($password) < 6) { + global $CONFIG; + + if (strlen($password) < $CONFIG->min_password_length) { throw new RegistrationException(elgg_echo('registration:passwordtooshort')); } diff --git a/engine/settings.example.php b/engine/settings.example.php index e6857e4c4..c503f0162 100644 --- a/engine/settings.example.php +++ b/engine/settings.example.php @@ -110,4 +110,13 @@ $CONFIG->broken_mta = FALSE; * * @global bool $CONFIG->db_disable_query_cache */ -$CONFIG->db_disable_query_cache = FALSE;
\ No newline at end of file +$CONFIG->db_disable_query_cache = FALSE; + +/** + * Minimum password length + * + * This value is used when validating a user's password during registration. + * + * @global int $CONFIG->min_password_length + */ +$CONFIG->min_password_length = 6;
\ No newline at end of file |