diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-04-21 06:48:08 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-04-21 06:48:08 -0700 |
commit | 0565d9f0f92ef9bd69c38e997e7c6e6d05d56ee1 (patch) | |
tree | 22e5cdf12adbb77bc05e6cfa968ded72d26f5995 /modules/user/helpers/user.php | |
parent | 027312596c29c1986d3480c7dda48533e6dd3ca8 (diff) | |
parent | 2257776f9b4c231033656db1eb23246035aa42fd (diff) |
Merge branch 'master' into talmdal_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); } } |