Set the minimum password length to 5. The gallery owner can change this in the advance settings.

This commit is contained in:
Tim Almdal
2009-10-27 10:13:52 -07:00
parent 60339d4584
commit 156a99beef
5 changed files with 24 additions and 5 deletions
+3 -2
View File
@@ -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(