]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/filter/auth/class_UserAuthFilter.php
Updated domain without a dash :(
[core.git] / inc / classes / main / filter / auth / class_UserAuthFilter.php
index 7f42bf8462b2776a978550c95bc0be71ba8cd671..cc7046844fc867242f9af55238fe31675b13577b 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A filter for checking user permissions
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007 - 2009 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
@@ -28,7 +28,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
        /**
         * The login method we shall choose
         */
-       private $authMethod = "";
+       private $authMethod = '';
 
        /**
         * Protected constructor
@@ -45,7 +45,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
         *
         * @return      $filterInstance                 An instance of this filter class
         */
-       public final static function createUserAuthFilter () {
+       public static final function createUserAuthFilter () {
                // Get a new instance
                $filterInstance = new UserAuthFilter();
 
@@ -62,7 +62,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
         * @return      void
         */
        protected function setDefaultAuthMethod () {
-               $this->authMethod = $this->getConfigInstance()->readConfig('auth_method_class');
+               $this->authMethod = $this->getConfigInstance()->getConfigEntry('auth_method_class');
        }
 
        /**
@@ -73,7 +73,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
         * @return      void
         * @throws      UserAuthorizationException      If the auth login was not found or if it was invalid
         * @throws      UserPasswordMismatchException   If the supplied password hash does not match
-        * @throws      ClassNotFoundException  If the user (guest/member) class was not found
+        * @throws      NoClassException        If the user (guest/member) class was not found
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Then get an auth instance for checking and updating the auth cookies
@@ -92,7 +92,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
                        $authInstance->destroyAuthData();
 
                        // Mark the request as invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('auth_data_incomplete');
@@ -102,20 +102,20 @@ class UserAuthFilter extends BaseFilter implements Filterable {
                } // END - if
 
                // Regular user account
-               $className = $this->getConfigInstance()->readConfig('user_class');
+               $className = $this->getConfigInstance()->getConfigEntry('user_class');
                $methodName = 'createMemberByUserName';
 
                // Now, try to get a user or guest instance
-               if ($authLogin == $this->getConfigInstance()->readConfig('guest_login_user')) {
+               if ($authLogin == $this->getConfigInstance()->getConfigEntry('guest_login_user')) {
                        // Set class
-                       $className = $this->getConfigInstance()->readConfig('guest_class');
+                       $className = $this->getConfigInstance()->getConfigEntry('guest_class');
                        $methodName = 'createGuestByUserName';
                } // END - if
 
                // Does the guest class exist?
                if (!class_exists($className)) {
                        // Then abort here
-                       throw new ClassNotFoundException (array($this, $className), self::EXCEPTION_CLASS_NOT_FOUND);
+                       throw new NoClassException (array($this, $className), self::EXCEPTION_CLASS_NOT_FOUND);
                } // END - if
 
                // Now try the dynamic login