/**
* 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, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 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
*
* @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();
* @return void
*/
protected function setDefaultAuthMethod () {
- $this->authMethod = $this->getConfigInstance()->readConfig('auth_method_class');
+ $this->authMethod = $this->getConfigInstance()->getConfigEntry('auth_method_class');
}
/**
* @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
$authInstance->destroyAuthData();
// Mark the request as invalid
- $requestInstance->requestIsValid(false);
+ $requestInstance->requestIsValid(FALSE);
// Add fatal message
$responseInstance->addFatalMessage('auth_data_incomplete');
} // 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