Skip to content

Instantly share code, notes, and snippets.

@brodkin
Last active December 19, 2015 03:39
Show Gist options
  • Save brodkin/5891711 to your computer and use it in GitHub Desktop.
Save brodkin/5891711 to your computer and use it in GitHub Desktop.
Magento Force Admin Login With Password
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