Skip to content

Instantly share code, notes, and snippets.

@fballiano
Created July 17, 2014 09:06
Show Gist options
  • Save fballiano/a74439d974324189583e to your computer and use it in GitHub Desktop.
Save fballiano/a74439d974324189583e to your computer and use it in GitHub Desktop.
Magento: start customer session from custom script
<?php
require_once "app/Mage.php";
umask(0);
Mage::app();
Mage::singleton("core/session", array("name"=>"frontend"));
$session = Mage::getSingleton("customer/session");
if ($session->isLoggedIn()) {
} else {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment