Get login customer fullname firstname lastname email-address in Magento

In this article get login customer data such as firstname, lastname, e-mail etc.
Firstly check if customer is login or not.
Then echo name and email etc.


Here is full code...
<?php
if (Mage::getSingleton('customer/session')->isLoggedIn())
{

    $customerData = Mage::getSingleton('customer/session')->getCustomer();
        $fullname = $customerData->getName();
echo $fullname . "<br>";

$firstname = $customerData->getFirstname();
echo $firstname . "<br>"; 

$lastname = $customerData->getLastname();
echo $lastname . "<br>";

$email = $customerData->getEmail();
echo $email; 

}
?>

Labels: