]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/user/class_BaseUser.php
Very early write (add) support for file-based stack indexes.
[core.git] / inc / classes / main / user / class_BaseUser.php
index ce67c061f9128cbde18ffbbae13484eb093e6698..bc7988a4990b744e3aad2234dc951475457ec990 100644 (file)
@@ -26,6 +26,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable {
        const EXCEPTION_USERNAME_NOT_FOUND   = 0x150;
        const EXCEPTION_USER_EMAIL_NOT_FOUND = 0x151;
        const EXCEPTION_USER_PASS_MISMATCH   = 0x152;
+       const EXCEPTION_USER_IS_GUEST        = 0x153;
 
        /**
         * Username of current user
@@ -121,7 +122,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable {
                $exists = FALSE;
 
                // Is a previous result there?
-               if (is_null($this->getResultInstance())) {
+               if (!$this->getResultInstance() instanceof SearchableResult) {
                        // Get a UserDatabaseWrapper instance
                        $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper_class');
 
@@ -165,7 +166,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable {
                $exists = FALSE;
 
                // Is a previous result there?
-               if (is_null($this->getResultInstance())) {
+               if (!$this->getResultInstance() instanceof SearchableResult) {
                        // Get a UserDatabaseWrapper instance
                        $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper_class');
 
@@ -220,7 +221,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable {
                $matches = FALSE;
 
                // Is a previous result there?
-               if (is_null($this->getResultInstance())) {
+               if ((!$this->getResultInstance() instanceof SearchableResult) || ($this->getResultInstance()->count() == 0)) {
                        // Get a UserDatabaseWrapper instance
                        $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper_class');