diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-05-13 01:49:54 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-05-13 01:49:54 +0000 |
commit | a0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (patch) | |
tree | a101f7a71a33f75c21d4ac828f442d902f5d8af9 /modules/user/helpers | |
parent | 104430e9e1e8dacd5e4320e29e59fc59aa5c6ee9 (diff) | |
parent | 9affa8ebbd539396d71f19003b91af577a8a183e (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/user/helpers')
-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); } } |