First up, my question is very similar to questions asked in Stackoverflow (and the web) such as: How to access Magento user's session from outside Magento?
What I need is, if a customer is logged into a Magento site, I want him to be logged on to a forum too. But try as I might, I'm unable to get isLoggedIn() to be true. Any suggestions on what I might be missing? Here's the minimal code chunk that should get me logged-in information:
require_once '/abs/path/to/Mage.php';
umask(0);
Mage::app('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));
$session = Mage::getSingleton('customer/session');
Zend_Debug::dump($session->isLoggedIn());
I checked the following:
- cookie path is set to '/'
- I dumped the $session variable and didn't get wiser
- As described here, I tried setting "Use Session ID in frontend", but it appears my Magento doesn't have that option (We use magento 1.3.2.4).
- I'm checking the variable of course by logging in and out as a customer
- Am including mage.php
Any help on what I might be missing?