]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php
createUniqueID -> generateUniqueId renamed, dataset criteria added, registration...
[shipsimu.git] / application / ship-simu / main / commands / web / class_WebShipsimuRegisterCommand.php
index e926dbf80450f91321cd9bf38ab6815f9d0fce5d..0940b79630a8c71dc65494c68983f9b873ef75b6 100644 (file)
@@ -35,7 +35,7 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable {
                $this->setObjectDescription("Registration handling command for Ship-Simu");
 
                // Create unique ID number
-               $this->createUniqueID();
+               $this->generateUniqueId();
 
                // Clean up a little
                $this->removeNumberFormaters();
@@ -76,7 +76,28 @@ class WebShipsimuRegisterCommand extends BaseCommand implements Commandable {
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
-               $this->partialStub();
+               // First get a UserRegistration instance
+               $registerInstance = ObjectFactory::createObjectByConfiguredName('user_registration');
+
+               // First set request and response instance
+               $registerInstance->setRequestInstance($requestInstance);
+               $registerInstance->setResponseInstance($responseInstance);
+
+               // Encrypt the password
+               $registerInstance->encryptPassword('pass1');
+
+               // Do things before registration
+               $registerInstance->doPreRegistration();
+
+               // Register the new user
+               $registerInstance->registerNewUser();
+
+               // Do things after registration like notifying partner pages or queueing
+               // them for notification
+               $registerInstance->doPostRegistration();
+
+               // Redirect or login after registration
+               $registerInstance->doPostAction();
        }
 }