X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Ffilter%2Fvalidator%2Fclass_PasswordValidatorFilter.php;h=624582e591659df547ca9ecead59f7f35c08bebc;hb=HEAD;hp=80a02acc80eb9edc31708a3ce46d2c4657681807;hpb=a60894f1d6ef33613d2d0351075aa07aa257f304;p=core.git diff --git a/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php b/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php index 80a02acc..a6ad85a7 100644 --- a/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php +++ b/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Validator\Password; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\BaseFilter; +use Org\Mxchange\CoreFramework\Filter\Chain\FilterChainException; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -14,7 +15,7 @@ use Org\Mxchange\CoreFramework\Response\Responseable; * * @author Roland Haeder * @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 * @@ -37,7 +38,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable { * * @return void */ - protected function __construct () { + private function __construct () { // Call parent constructor parent::__construct(__CLASS__); } @@ -71,7 +72,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable { // Is the password still not set? if ((is_null($password1)) || (is_null($password2))) { // Not found in form so stop the filtering process - $requestInstance->requestIsValid(false); + $requestInstance->setIsRequestValid(FALSE); // Add a message to the response $responseInstance->addFatalMessage('password_unset'); @@ -80,32 +81,32 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable { throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); } elseif ((empty($password1)) || (empty($password2))) { // Password is empty - $requestInstance->requestIsValid(false); + $requestInstance->setIsRequestValid(FALSE); // Is the password empty? if (empty($password1)) { // Add a message to the response $responseInstance->addFatalMessage('pass1_empty'); - } // END - if + } // Is the confirmation empty? if (empty($password2)) { // Add a message to the response $responseInstance->addFatalMessage('pass2_empty'); - } // END - if + } // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); } elseif ($password1 != $password2) { // Passwords didn't match - $requestInstance->requestIsValid(false); + $requestInstance->setIsRequestValid(FALSE); // Add a message to the response $responseInstance->addFatalMessage('pass_mismatch'); // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - elseif + } } }