I’m customizing the product view page and I need to show the user’s name. How do I access the account information of the current user (if he’s logged in) to get Name etc. ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Found under ‘app/code/core/Mage/Page/Block/Html/Header.php’:
So it looks like
Mage::getSingleton('customer/session')->getCustomer()will get your current logged in customer 😉To get the currently logged in admin: