Fix a bug in valid_password() where an empty password was considered valid.

This commit is contained in:
Bharat Mediratta
2010-02-02 21:34:20 -08:00
parent 225fe81ce0
commit b351ee48fe

View File

@@ -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");