NPE catched, command class added, beter coding practice applied:
[core.git] / inc / classes / main / user / class_BaseUser.php
index 5de1249a2781c0aa2ce2af4d7ece77ffa3e8f9fd..0aa89c354c6587ed574ab73fc8f815077ae6bf0f 100644 (file)
@@ -241,13 +241,16 @@ class BaseUser extends BaseFrameworkSystem implements Updateable {
                        $this->setResultInstance($resultInstance);
                } // END - if
 
-               // Rewind it
+               // Rewind it and advance to first entry
                $this->getResultInstance()->rewind();
 
+               // This call set the result instance to a clean state
+               $this->getResultInstance()->next();
+
                // Search for it
                if ($this->getResultInstance()->find('pass_hash')) {
                        // So does the hashes match?
-                       //* DEBUG: */ echo $requestInstance->getRequestElement('pass_hash') . '/' . $this->getResultInstance()->getFoundValue() . '<br />';
+                       //* DEBUG: */ echo $requestInstance->getRequestElement('pass_hash') . '<br />' . $this->getResultInstance()->getFoundValue() . '<br />';
                        $matches = ($requestInstance->getRequestElement('pass_hash') === $this->getResultInstance()->getFoundValue());
                } // END - if