diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-04-17 12:33:18 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-04-17 12:33:18 -0700 |
commit | 10f849cd0a8824a8f853a55e49859de30a291f01 (patch) | |
tree | 79c12131b2c4910fef866cc995365a9fa2b77a09 /modules/user/helpers/user.php | |
parent | b4d1a5686c69d598efa5d387021912a0e31260ca (diff) | |
parent | 6d81feacae8329cd0c65abe920ecd3fa2e8f2537 (diff) |
Merge branch 'master' into bharat_dev
Diffstat (limited to 'modules/user/helpers/user.php')
-rw-r--r-- | modules/user/helpers/user.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index 650dcf6a..55153263 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -72,7 +72,13 @@ class user_Core { static function valid_password($password_input) { if (!user::is_correct_password(identity::active_user(), $password_input->value)) { - $password_input->add_error("invalid", 1); + $password_input->add_error("invalid_password", 1); + } + } + + static function valid_username($text_input) { + if (!self::lookup_by_name($text_input->value)) { + $text_input->add_error("invalid_username", 1); } } |