]> git.mxchange.org Git - shipsimu.git/commitdiff
Fixed check of username
authorRoland Häder <roland@mxchange.org>
Sun, 1 Jun 2008 11:06:03 +0000 (11:06 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 1 Jun 2008 11:06:03 +0000 (11:06 +0000)
application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php
inc/classes/main/io/class_FrameworkDirectoryPointer.php
inc/classes/main/user/class_User.php
inc/config.php

index 86b95269e349f59599f06bcadd91a114e98e167a..36801594f0618d021033675d398f84da13c43c2f 100644 (file)
@@ -59,7 +59,7 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable {
                $controllerInstance = $resolverInstance->getControllerInstance();
 
                // @TODO Add some more pre/post filters to the controller
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByName('UserNameValidatorFilter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_validator'));
 
                // Return the prepared instance
                return $commandInstance;
index 7ce3c4ecb744e4639586a212cf90aa8edd6ec6fc..f0f2dd8a9a5c0515f400468e23a3e529acab3f5a 100644 (file)
@@ -67,11 +67,11 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
         * Create a directory pointer based on the given path. The path will also
         * be verified here.
         *
-        * @param       $pathName                               The path name we shall pass
+        * @param               $pathName                                       The path name we shall pass
         *                                                                      to opendir()
-        * @param       $inConstructor                  If we are in de/con-structor
+        * @param               $inConstructor                          If we are in de/con-structor
         *                                                                      or from somewhere else
-        * @throws      PathIsEmptyException    If the provided path name
+        * @throws      PathIsEmptyException            If the provided path name
         *                                                                      is empty
         * @throws      InvalidPathStringException      If the provided path name is
         *                                                                      not a string
@@ -79,9 +79,9 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
         *                                                                      not valid
         * @throws      PathReadProtectedException      If the provided path name is
         *                                                                      read-protected
-        * @throws      DirPointerNotOpened             If opendir() returns not a
+        * @throws      DirPointerNotOpened                     If opendir() returns not a
         *                                                                      directory resource
-        * @return      $pointerInstance                A prepared instance of
+        * @return      $pointerInstance                        A prepared instance of
         *                                                                      FrameworkDirectoryPointer
         */
        public final static function createFrameworkDirectoryPointer ($pathName, $inConstructor = false) {
index 280adec1600d86e43d65fc161b223fbe348da7eb..ad4498cb56db5dee9b704e27ea3b583b6bc709d5 100644 (file)
@@ -121,10 +121,10 @@ class User extends BaseFrameworkSystem implements ManageableUser {
                $result = $wrapperInstance->doSelectByCriteria($criteriaInstance);
 
                // Search for it
-               if ($result->next()) {
-                       // Entry found, so all is fine
-                       $exists = true;
-               }
+               if (!$result->next()) {
+                       // Entry not found
+                       $exists = false;
+               } // END - if
 
                // Return the status
                return $exists;
index e918a66b5d1822fab8ba25bc7c2d9a9e13027fa6..835e34e182fb99f4996ddcd63966a06df5e35918 100644 (file)
@@ -162,5 +162,8 @@ $cfg->setConfigEntry('file_input_stream', "FileIoStream");
 // CFG: FILE-OUTPUT-STREAM
 $cfg->setConfigEntry('file_output_stream', "FileIoStream");
 
+// CFG: USERNAME-VALIDATOR
+$cfg->setConfigEntry('username_validator', "UserNameValidatorFilter");
+
 // [EOF]
 ?>