From 156a99beef968a22167502bb6389b4df7526feb0 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 27 Oct 2009 10:13:40 -0700 Subject: Set the minimum password length to 5. The gallery owner can change this in the advance settings. --- modules/user/controllers/password.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/user/controllers/password.php') diff --git a/modules/user/controllers/password.php b/modules/user/controllers/password.php index b76a5e92..888fb37d 100644 --- a/modules/user/controllers/password.php +++ b/modules/user/controllers/password.php @@ -101,8 +101,9 @@ class Password_Controller extends Controller { if (!empty($hash)) { $hidden->value($hash); } - $group->password("password")->label(t("Password"))->id("g-password") - ->rules("required|length[1,40]"); + $minimum_length = module::get_var("user", "mininum_password_length", 5); + $input_password = $group->password("password")->label(t("Password"))->id("g-password") + ->rules($minimum_length ? "required|length[$minimum_length, 40]" : "length[40]"); $group->password("password2")->label(t("Confirm Password"))->id("g-password2") ->matches($group->password); $group->inputs["password2"]->error_messages( -- cgit v1.2.3