I have Magento 1.9, If i try to access magento admin area by just putting the

URL: www.domain.com/admin

then i dont see login area but i just see this error:

Fatal error: Call to a member function getUser() on a non-object in /home/themename/public_html/app/code/core/Mage/Admin/Model/Observer.php on line 52

Do you know the fix of this?

  • check that file, comment out line 52 (if possible) and try reloading again
    – Steven J
    Commented Dec 15, 2017 at 1:00
  • @StevenJ I have commented out but didnt solve the issue
    – mak
    Commented Dec 15, 2017 at 17:53
  • 1
    If it's a core file, you could download an archive of your version of magento, or the latest patched version of that file.
    – Steven J
    Commented Dec 15, 2017 at 22:11

2 Answers 2


Please remove following directory from your site

var/session, var/cache

And Try again with admin URL.

  • I deleted both cache and session folder but i am still finding same error
    – mak
    Commented Dec 15, 2017 at 17:52

I have fixed this issue by downloading from magento website and just replaced core folder from newly downloaded files to my website. And it fixed the issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.