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:40 -07:00
parent 60339d4584
commit 156a99beef
5 changed files with 24 additions and 5 deletions

View File

@@ -78,6 +78,11 @@ class Users_Controller extends Controller {
$group->input("url")->label(t("URL"))->id("g-url")->value($user->url);
$form->add_rules_from($user);
$minimum_length = module::get_var("user", "mininum_password_length", 5);
$form->edit_user->password
->rules($minimum_length ? "length[$minimum_length, 40]" : "length[40]");
module::event("user_edit_form", $user, $form);
$group->submit("")->value(t("Save"));
return $form;