summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-02-02 21:34:20 -0800
committerBharat Mediratta <bharat@menalto.com>2010-02-02 21:34:20 -0800
commitb351ee48fe09efd570e22a02b82174c39ad86d46 (patch)
tree2bdbefb39d5bde63379d167db815392f45b2ec75
parent225fe81ce0121176dc11a646d78b3c3dcc479fa9 (diff)
Fix a bug in valid_password() where an empty password was considered valid.
-rw-r--r--modules/user/models/user.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/user/models/user.php b/modules/user/models/user.php
index 9871ca00..4404ee63 100644
--- a/modules/user/models/user.php
+++ b/modules/user/models/user.php
@@ -136,7 +136,7 @@ class User_Model extends ORM implements User_Definition {
return;
}
- if (!$this->loaded() || $this->password_length) {
+ if (!$this->loaded() || isset($this->password_length)) {
$minimum_length = module::get_var("user", "mininum_password_length", 5);
if ($this->password_length < $minimum_length) {
$v->add_error("password", "min_length");