NPE catched, command class added, beter coding practice applied:
[core.git] / inc / classes / main / user / class_BaseUser.php
index 5de1249..0aa89c3 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