X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fcity%2Fclasses%2Fregistration%2Fclass_CityRegistration.php;h=5c1e74ba417bc3b2ff737d28166393a1dcd2f062;hb=2a4a84d632f4e2319b974c3ffd5d93613b1e785b;hp=6f7ef43959fcdab47d9132d4823120b81f8f5450;hpb=b9373eb6c1b134fdef22bda0f97a3e8ca34f3def;p=city.git diff --git a/application/city/classes/registration/class_CityRegistration.php b/application/city/classes/registration/class_CityRegistration.php index 6f7ef43..5c1e74b 100644 --- a/application/city/classes/registration/class_CityRegistration.php +++ b/application/city/classes/registration/class_CityRegistration.php @@ -3,6 +3,13 @@ namespace Org\Mxchange\City\Registration; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; +use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; +use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper; +use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory; +use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Registration\BaseRegistration; +use Org\Mxchange\CoreFramework\Registration\User\UserRegister; use Org\Mxchange\CoreFramework\Request\Requestable; /** @@ -90,18 +97,18 @@ class CityRegistration extends BaseRegistration implements UserRegister { */ public function encryptPassword ($requestKey) { // Check if password is found in request - if ($this->getRequestInstance()->isRequestElementSet($requestKey)) { + if (FrameworkBootstrap::getRequestInstance()->isRequestElementSet($requestKey)) { // So encrypt the password and store it for later usage in // the request: // 1.: Get the plain password - $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey); + $plainPassword = FrameworkBootstrap::getRequestInstance()->getRequestElement($requestKey); // 2. Get a crypto helper and hash the password $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword); // 3. Store the hash back in request - $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword); + FrameworkBootstrap::getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword); } } @@ -155,7 +162,7 @@ class CityRegistration extends BaseRegistration implements UserRegister { $actionInstance = ObjectFactory::createObjectByConfiguredName('post_registration_class'); // Execute the action - $actionInstance->execute($this->getRequestInstance(), $this->getResponseInstance()); + $actionInstance->execute(FrameworkBootstrap::getRequestInstance(), FrameworkBootstrap::getResponseInstance()); } /** @@ -170,7 +177,7 @@ class CityRegistration extends BaseRegistration implements UserRegister { $configEntry = 'user_status_unconfirmed'; // Is the confirmation process entirely disabled? - if ($this->getConfigInstance()->getConfigEntry('confirm_email_enabled') === 'N') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('confirm_email_enabled') === 'N') { // No confirmation of email needed $configEntry = 'user_status_confirmed'; } // END - if @@ -180,20 +187,20 @@ class CityRegistration extends BaseRegistration implements UserRegister { // Do we have an alias? if (is_string($alias)) { // Yes, so use it - $criteriaInstance->addCriteria($alias, $this->getRequestInstance()->getRequestElement($element)); + $criteriaInstance->addCriteria($alias, FrameworkBootstrap::getRequestInstance()->getRequestElement($element)); // Debug message - //* DEBUG: */ $this->debugOutput('ALIAS: alias='.$alias.',element='.$element.'='.$this->getRequestInstance()->getRequestElement($element)); + //* DEBUG: */ $this->debugOutput('ALIAS: alias='.$alias.',element='.$element.'='.FrameworkBootstrap::getRequestInstance()->getRequestElement($element)); } else { // No, default entry - $criteriaInstance->addCriteria($element, $this->getRequestInstance()->getRequestElement($element)); + $criteriaInstance->addCriteria($element, FrameworkBootstrap::getRequestInstance()->getRequestElement($element)); // Debug message - //* DEBUG: */ $this->debugOutput('DEFAULT: element='.$element.'='.$this->getRequestInstance()->getRequestElement($element)); + //* DEBUG: */ $this->debugOutput('DEFAULT: element='.$element.'='.FrameworkBootstrap::getRequestInstance()->getRequestElement($element)); } // Is this a guest account? - if ((($element == 'username') || ($alias == 'username')) && ($this->getRequestInstance()->getRequestElement($element) == $this->getConfigInstance()->getConfigEntry('guest_login_user'))) { + if ((($element == 'username') || ($alias == 'username')) && (FrameworkBootstrap::getRequestInstance()->getRequestElement($element) == FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_user'))) { // Yes, then set the config entry to guest status $configEntry = 'user_status_guest'; } // END - if @@ -209,6 +216,3 @@ class CityRegistration extends BaseRegistration implements UserRegister { $criteriaInstance->addCriteria('registered', date('Y-m-d H:i:s', time())); } } - -// -?>