From 2fee8a96a668ae3fa82c6cb2d1206d00098e8b50 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 14 Aug 2012 19:01:19 +0200 Subject: [PATCH] Avoiding PHP warning --- main/inc/lib/formvalidator/Rule/Username.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main/inc/lib/formvalidator/Rule/Username.php b/main/inc/lib/formvalidator/Rule/Username.php index e15c4aca87..9838c97cec 100644 --- a/main/inc/lib/formvalidator/Rule/Username.php +++ b/main/inc/lib/formvalidator/Rule/Username.php @@ -34,10 +34,7 @@ class HTML_QuickForm_Rule_Username extends HTML_QuickForm_Rule { * @return boolean True if username is of the correct format * @author Modified by Ivan Tcholakov, 15-SEP-2009. The validation rule is served by the UserManager class as of this moment. */ - function validate($username) { - if (!class_exists('UserManager')) { - require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; - } + function validate($username, $options) { return UserManager::is_username_valid($username); } }