statickidz / magento-external-auth

Simple functions to authenticate in Magento outside your code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Magento External Authentication

Simple functions to authenticate in Magento outside your code (not your server)

Usage

//Try to login
if(MagentoAuth::loginCustomer('username', 'password123')) {
	print 'Logged in! <br>';
	if(MagentoAuth::isLoggedIn()) {
		print 'Still logged in! <br>';
	}

	//Get logged customer
	$customer = MagentoAuth::getLoggedCustomer();
	print $customer->getEmail().'<br>';
} else {
	print 'Login Failed <br>';
}

MagentoAuth::logoutCustomer();

About

Simple functions to authenticate in Magento outside your code


Languages

Language:PHP 100.0%