Magento - Customer password encryption
Tech-Today

Magento - Customer password encryption


Unfortunately, since we have to integrate our another customized system x in magento, we have to find a way to sync it's users and passwords fields.

Which we have achieved by:

Assumption:
1.) You must have a deployed magento system which you can access (because magento's libraries will be use in this solution). Specifically, core/encryption and core/helper/data.

To call the magento api in another system, paste the following lines:

require_once 'app/Mage.php'; //change the directory accordingly :D
umask(0);
$app = Mage::app('default');


And add more lines:

$obj = Mage::getModel('core/encryption'); //instantiate the core encryption mode,
$helper = Mage::helper('core'); //instantiate the core helper,
$obj->setHelper($helper); //set the encryptions helper,
$enc_pwd = $obj->getHash($pwd, 2); //get the password's hash


BTW, for info, you can check if you have entered a correct password by adding this line:

echo $obj->validateHash($pwd, $enc_pwd);


If it echoes 1 then the password is correct. Try it, it works for me.




- Web Development
WordpressConfigure Custom Wordpress PermalinkZencartHow to add a customize product admin fields in zencart by editing/adding extra codesJoomlaHow to install/setup/configure joomla to run in a xampp setup. This avoids the technical detail of manually installing...

- Magento All Links Throws 404 Not Found Error
After downloading and installing magento 1.7.4 for evaluation, I found out that by default all the frontend links are not working. But the backend works fine. As I remember long time ago this is a problem when deploying locally and using a virtual address,...

- Create A Magento Extension That Will Only Allow A Customer To Login Until A Given Expiry Time
Long time ago I was assigned to modify magento, add an expiry date and check if the costumer is expired during login. Those times resource were scarce and what I did was hacked magento, add custom codes and fields in the database. Which is not a good...

- How To Download A Zipped File Of A Magento Extension
There are times when you want to see the code behind of a magento extension, but using magento connect would not give you all the files that have been created. To do that simply go to url below and type the Magento Connect 1 extension key: http://freegento.com/ddl-magento-extension.php...

- Magento Change Label Of My Wishlist, Etc:
Magento change label of My Wishlist, etc: This works for me: I've change all the wishlist instances in these csv files: app/locale/en_US/ Mage_Adminhtml Mage_catalog Mage_Checkout Mage_Customer Mage_Reports Mage_Sales Mage_Tag Mage_Wishlist Make sure...



Tech-Today








.