Today I upgraded a client to the latest version of Magento (1.7.0.2). Â Upon finishing the FTP of the new version, I could see the front end of the website with no problem. Â The backend, however, would not work becuase of this error:
Fatal error: Call to a member function getUsername() on a non-object in /app/design/adminhtml/default/default/template/page/header.phtml
At first I thought it was going to be a long, time consuming error, but turns out the fix is really easy.
The easiest way to fix it is to rename your /var/ folder to /var_old/ and then build a new /var/ folder. Â This basically wipes out all cache, sessions, etc.
There may be cases where you can get away with just deleting all files from inside  /var/cache and var/session as well.
Will it’s official your a geek. 🙂 Thanks for the fix