I have a magento installation I want to access the logged in admin credentials in a file inside a subfolder. I make a file and keep it in the root (the same folder where the magento index.php resides). It shows me the logged in user data perfectly. Now when I copy the same file inside a subfolder it returns the data but the data array(which contains the loggedin user information) is empty. Below is the code
require_once ('app/Mage.php');
Mage::app();
$user = Mage::getSingleton('admin/session');
print_r($user);