diff options
-rw-r--r-- | modules/user/helpers/user.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index 650dcf6a..1ad4bbd2 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -76,6 +76,12 @@ class user_Core { } } + static function valid_username($text_input) { + if (!self::lookup_by_name($text_input->value)) { + $text_input->add_error("invalid_username", 1); + } + } + /** * Create the hashed passwords. * @param string $password a plaintext password |