]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/filter/guest/class_UserNameIsGuestFilter.php
Continued:
[core.git] / framework / main / classes / filter / guest / class_UserNameIsGuestFilter.php
index 20683cb61f1c692fe46f71d7522d92fa60ac46b5..d05523f152125225dadd08f981e356eb43014c8f 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Filter\User\Username;
 
 // Import framework stuff
 namespace Org\Mxchange\CoreFramework\Filter\User\Username;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Filter\BaseFilter;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Filter\BaseFilter;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Request\Requestable;
@@ -14,7 +15,7 @@ use Org\Mxchange\CoreFramework\Response\Responseable;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -37,7 +38,7 @@ class UserNameIsGuestFilter extends BaseFilter implements Filterable {
         *
         * @return      void
         */
         *
         * @return      void
         */
-       protected function __construct () {
+       private function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
@@ -67,11 +68,11 @@ class UserNameIsGuestFilter extends BaseFilter implements Filterable {
                $userName = $requestInstance->getRequestElement('username');
 
                // Does the user name match the guest login?
                $userName = $requestInstance->getRequestElement('username');
 
                // Does the user name match the guest login?
-               if ($userName == $this->getConfigInstance()->getConfigEntry('guest_login_user')) {
+               if ($userName == FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_user')) {
                        // Then set the password to the configured password
                        // Then set the password to the configured password
-                       $requestInstance->setRequestElement('pass1', $this->getConfigInstance()->getConfigEntry('guest_login_passwd'));
-                       $requestInstance->setRequestElement('pass2', $this->getConfigInstance()->getConfigEntry('guest_login_passwd'));
-               } // END - if
+                       $requestInstance->setRequestElement('pass1', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_passwd'));
+                       $requestInstance->setRequestElement('pass2', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_passwd'));
+               }
        }
 
 }
        }
 
 }