Updated domain without a dash :(
[core.git] / inc / classes / main / filter / guest / class_UserNameIsGuestFilter.php
index 20155ac3d92bfe70a741b88dfc8df7c0f07dfb00..0ec265eae6f9cee87c81763375fb5c93d96a2ddb 100644 (file)
@@ -3,11 +3,11 @@
  * A filter for checking if username "guest" has been choosen as configured. If
  * so the password will be set to the configured password.
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -36,16 +36,12 @@ class UserNameIsGuestFilter extends BaseFilter implements Filterable {
        /**
         * Creates an instance of this filter class
         *
-        * @param       $controllerInstance             An instance of a Controller class
         * @return      $filterInstance                 An instance of this filter class
         */
-       public final static function createUserNameIsGuestFilter (Controller $controllerInstance) {
+       public static final function createUserNameIsGuestFilter () {
                // Get a new instance
                $filterInstance = new UserNameIsGuestFilter();
 
-               // Set the controller
-               $filterInstance->setControllerInstance($controllerInstance);
-
                // Return the instance
                return $filterInstance;
        }
@@ -62,10 +58,10 @@ class UserNameIsGuestFilter extends BaseFilter implements Filterable {
                $userName = $requestInstance->getRequestElement('username');
 
                // Does the user name match the guest login?
-               if ($userName == $this->getConfigInstance()->readConfig('guest_login_user')) {
+               if ($userName == $this->getConfigInstance()->getConfigEntry('guest_login_user')) {
                        // Then set the password to the configured password
-                       $requestInstance->setRequestElement('pass1', $this->getConfigInstance()->readConfig('guest_login_passwd'));
-                       $requestInstance->setRequestElement('pass2', $this->getConfigInstance()->readConfig('guest_login_passwd'));
+                       $requestInstance->setRequestElement('pass1', $this->getConfigInstance()->getConfigEntry('guest_login_passwd'));
+                       $requestInstance->setRequestElement('pass2', $this->getConfigInstance()->getConfigEntry('guest_login_passwd'));
                } // END - if
        }
 }