https://github.com/statickidz/magento-external-auth
Simple functions to authenticate in Magento outside your code
https://github.com/statickidz/magento-external-auth
Last synced: 4 months ago
JSON representation
Simple functions to authenticate in Magento outside your code
- Host: GitHub
- URL: https://github.com/statickidz/magento-external-auth
- Owner: statickidz
- Created: 2016-01-08T11:57:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-08T20:12:22.000Z (over 10 years ago)
- Last Synced: 2024-12-31T03:12:32.647Z (over 1 year ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Magento External Authentication
Simple functions to authenticate in Magento outside your code (not your server)
## Usage
```php
//Try to login
if(MagentoAuth::loginCustomer('username', 'password123')) {
print 'Logged in!
';
if(MagentoAuth::isLoggedIn()) {
print 'Still logged in!
';
}
//Get logged customer
$customer = MagentoAuth::getLoggedCustomer();
print $customer->getEmail().'
';
} else {
print 'Login Failed
';
}
MagentoAuth::logoutCustomer();
```