summaryrefslogtreecommitdiff
path: root/modules/user/helpers/user.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-04-21 06:48:08 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-04-21 06:48:08 -0700
commit0565d9f0f92ef9bd69c38e997e7c6e6d05d56ee1 (patch)
tree22e5cdf12adbb77bc05e6cfa968ded72d26f5995 /modules/user/helpers/user.php
parent027312596c29c1986d3480c7dda48533e6dd3ca8 (diff)
parent2257776f9b4c231033656db1eb23246035aa42fd (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/user/helpers/user.php')
-rw-r--r--modules/user/helpers/user.php8
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);
}
}