Universal WebTech
  • Home
  • About US
    • Our Team
    • Privacy Policy
    • Our Clients
    • Terms of use
  • Service
    • Web Development
    • E-Commerce
    • Android Development
    • UI UX Design
  • Our Portfolio
  • Career
  • Blogs
contact
hamburger

Magento get login customer information

Suppose we want to get all information of login User like Full Name, First Name, Middle Name, Last Name etc. We can also check user registration date, Date of Birth and many more information. Below is code to display information of customer.

// Check if any customer is logged in or not
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
// Load the customer's data
$customer = Mage::getSingleton('customer/session')->getCustomer();
$customer->getPrefix();
$customer->getName(); // Full Name
$customer->getFirstname(); // First Name
$customer->getMiddlename(); // Middle Name
$customer->getLastname(); // Last Name
$customer->getSuffix();
// All other customer data
$customer->getWebsiteId(); // ID
$customer->getEntityId(); // ID
$customer->getEntityTypeId(); // ID
$customer->getAttributeSetId(); // ID
$customer->getEmail();
$customer->getGroupId(); // ID
$customer->getStoreId(); // ID
$customer->getCreatedAt(); // yyyy-mm-ddThh:mm:ss+01:00
$customer->getUpdatedAt(); // yyyy-mm-dd hh:mm:ss
$customer->getIsActive(); // 1
$customer->getDisableAutoGroupChange();
$customer->getTaxvat();
$customer->getPasswordHash();
$customer->getCreatedIn(); // Admin
$customer->getGender(); // ID
$customer->getDefaultBilling(); // ID
$customer->getDefaultShipping(); // ID
$customer->getDob(); // yyyy-mm-dd hh:mm:ss
$customer->getTaxClassId(); // ID
}

Universal WebTech

Universal WebTech IT Solutions is a leading web and mobile development company in Ahmedabad, India that believes in winning trust of its clients through 100% quality service and time-oriented work.

Company

  • About us
  • Careers
  • FAQs
  • Testimonials
  • Blogs
  • Our team

Service

  • Web Development
  • Android Application Development
  • eCommerce Web Development
  • Open Source Customization
  • UI / UX / Logo Design Services

Copyright © 2025 Universal WebTech

  • Terms of use
  • Privacy Policy