cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Issue on Current Customer Details

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Getting Issue on Current Customer Details

I am Using Magento 1.9.1.0 . Now i Have to take display the current groupid on phtml file. I have used below coding. There was no luck.

Tried Below Coding to display the group id:-

$roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();

$customer_id = Mage::getSingleton('customer/session')->getId();
$customerz = Mage::getModel('customer/customer')->load($customer_id);
$roleID = $customerz->getGroupId();

$session=Mage::getSingleton('customer/session', array('name'=>'frontend') ); 
$rolx = $session->getCustomer()->getGroupId();


Mage::getSingleton("core/session", array("name" => "frontend"));
$session1 = $session = Mage::getSingleton("customer/session");
$def = $session1->getCustomer()->getGroupId();

 I have Tried above , but sometime showing loggedout groupid's. 1.its not getting the current user details. and not clearing after the customer was logged out. please help Genius. After Logout Also Showing the last loggedin customer details. how can i fix this