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

Online llegrand

  • Hero Member
  • *****
  • Posts: 1322
  • Karma: +335/-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?

Thanks
Lee

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1716
  • Karma: +228/-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

 

LoliPromDress.com Prom dresses 2018