diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-27 10:13:40 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-27 10:13:52 -0700 |
| commit | 156a99beef968a22167502bb6389b4df7526feb0 (patch) | |
| tree | ff844e8d730e9093644af7fb7ce79a50a8a42fda /modules/user/controllers/users.php | |
| parent | 60339d4584e7a729d96256c59a48ad6a4692da1d (diff) | |
Set the minimum password length to 5. The gallery owner can change this in the advance settings.
Diffstat (limited to 'modules/user/controllers/users.php')
| -rw-r--r-- | modules/user/controllers/users.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/user/controllers/users.php b/modules/user/controllers/users.php index 28164e9c..3507ec6d 100644 --- a/modules/user/controllers/users.php +++ b/modules/user/controllers/users.php @@ -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; |
