Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: decrpyting and recrypting passwords  (Read 4524 times)

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1294
  • Karma: +326/-2
    • View Profile
decrpyting and recrypting passwords
« on: July 28, 2015, 03:52:58 PM »
I find I need to re-do a database that has passwords for accounts -  some were using one Salt key,  some were using another

I would like to decrypt the passwords and then reset them with all the same salt key.   There are a lot of them,  and the customers will NOT be happy if they have to do this themselves, lots of really old, crotchety  customers on this site - who complain about everything -  so would be great if I could get this done behind the scenes.

You have any guidance on doing this?


Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1694
  • Karma: +223/-10
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: decrpyting and recrypting passwords
« Reply #1 on: July 29, 2015, 07:24:58 AM »
1. you need to know decrypted pass anyway.
2. usually we do reset via sql inside any controller.
for ex.
Code: [Select]
$this->db->query("UPDATE " . $this->db->table("users") . "
  SET password = '" . $this->db->escape(AEncryption::getHash('YOUR_PASSWORD')) . "'
  WHERE user_id = 'YOUR_USER_ID' ");
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens Prom dresses 2018