aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/users.php4
-rw-r--r--engine/settings.example.php11
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