]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/filter/validator/class_UserNameValidatorFilter.php
Email address confirmation now working (not in registration):
[shipsimu.git] / inc / classes / main / filter / validator / class_UserNameValidatorFilter.php
index 6c531d26e9c4a8d60f05d704c5be0e6ad7d559e6..43927a7d01917e5e5683b5dfb3c359ab4a7a6066 100644 (file)
@@ -7,7 +7,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -24,7 +24,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class UserNameValidatorFilter extends BaseFrameworkSystem implements Filterable {
+class UserNameValidatorFilter extends BaseFilter implements Filterable {
        /**
         * Protected constructor
         *
@@ -39,10 +39,6 @@ class UserNameValidatorFilter extends BaseFrameworkSystem implements Filterable
 
                // Create unique ID number
                $this->generateUniqueId();
-
-               // Clean up a little
-               $this->removeNumberFormaters();
-               $this->removeSystemArray();
        }
 
        /**
@@ -125,7 +121,7 @@ class UserNameValidatorFilter extends BaseFrameworkSystem implements Filterable
                        // If this instance is created then the username *does* exist
                        try {
                                // Get a new instance
-                               $userInstance = User::createUserByUsername($userName);
+                               $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('user_class'), "createUserByUsername"), array($userName));
 
                                // Remember this user instance in our registry for later usage
                                $registry->addInstance('user', $userInstance);
@@ -138,7 +134,7 @@ class UserNameValidatorFilter extends BaseFrameworkSystem implements Filterable
                if ((is_null($userInstance)) || (!$userInstance->ifUsernameExists())) {
                        // This username is still available
                        $alreadyTaken = false;
-               }
+               } // END - if
 
                // Return the result
                return $alreadyTaken;