title: How to get Magento customer ID
body: <p>Ugh how do I get the customer ID!!? These are all things I've tried! Can you see what I'm doing wrong?</p>
  
  <pre><code>//include_once "app/Mage.php";
  require_once '/home/ab71714/public_html/app/Mage.php';
  
  //Mage::app("default");
  
  Mage::app()-&gt;setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
  
  if($customer = Mage::getSingleton('customer/session')-&gt;isLoggedIn()) {
      $customerData = Mage::getModel('customer/customer')-&gt;load($customer-&gt;getId())-&gt;getData();
      print_r($customerData);
      echo $customerData-&gt;getId();
  }
  
  //$customerData = Mage::getModel('customer/customer');
  //$customerID = $customerData -&gt; getId(); 
  
  //$userinfo = $customerData-&gt;_origData; // fetch users info
  $customerID=$customer -&gt; getId(); 
  //$customerID = $customerData-&gt;getEntityId();
  //$customerID = $customerData[entity_id];
  </code></pre>