In Magento 1.3.2.2 we get a fatal error:
Fatal error: Call to a member function getUsername() on a non-object in
.../app/design/adminhtml/default/default/template/page/header.phtml on line 31
During an order confirmation, Magento should make a transition to the success page. But we are getting that error instead.
An Admin header is shown with this error. If I refresh, I get to the success page where I should have been taken if everything was ok.
Best Answer
This error happens because header.phtml on line 31 has entry:
But getUser() method didn't return valid object. This method pretty simple and looks like this:
So, you should debug only one place: app/code/core/Mage/Admin/Model/Session.php Only one method setUser() object to session
If user object loads and valid it is mean that you have problem with session it self:
It is not easy find the problem remotely without debugging. So I wish you success.