Last active
December 19, 2015 03:39
-
-
Save brodkin/5891711 to your computer and use it in GitHub Desktop.
Magento Force Admin Login With Password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mage::app("default"); | |
$username = 'admin'; | |
$password = 'password'; | |
try{ | |
$authenticated = Mage::getModel('admin/user')->authenticate($username, $password); | |
} catch ( Exception $e ) { | |
$authenticated = false; | |
} | |
// Do something depending on whether $authenticated is truthy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment