Added isGuest() isConfirmed() to BaseUser for wrapping this type of check into
[core.git] / inc / classes / main / filter / verifier / class_UserStatusVerifierFilter.php
index 838195fa43797ebd5191a5ceefd297877a340963..94b62a23cd400b6ccf8764e27a9ae3747fd5159e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 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.shipsimu.org
  *
@@ -57,7 +57,7 @@ class UserStatusVerifierFilter extends BaseFilter implements Filterable {
                $userInstance = Registry::getRegistry()->getInstance('user');
 
                // Is the user account confirmed?
-               if (($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_confirmed')) && ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_guest')) && ($requestInstance->getRequestElement('action') != $this->getConfigInstance()->getConfigEntry('action_status_problem'))) {
+               if ((!$userInstance->isConfirmed()) && (!$userInstance->isGuest()) && ($requestInstance->getRequestElement('action') != $this->getConfigInstance()->getConfigEntry('action_status_problem'))) {
                        // Request is invalid!
                        $requestInstance->requestIsValid(FALSE);