Skip to content

Instantly share code, notes, and snippets.

@usmanismail
Created June 8, 2015 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usmanismail/677dca291148c672e4dc to your computer and use it in GitHub Desktop.
Save usmanismail/677dca291148c672e4dc to your computer and use it in GitHub Desktop.
<?php
require_once 'app/Mage.php';
umask(0);
/* not Mage::run(); */
Mage::app('default');
## For magento1.7 or Earlier var
//$_HASH_SALT_LENGTH = 2;
## For magento1.8 and magento1.9
$_HASH_SALT_LENGTH = 32;
#Generate admin password
$password = "admin1234";
echo $adminPass = Mage::helper('core')->getHash($password, $_HASH_SALT_LENGTH);
## And reset password field in "admin_user" table
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment