Jump to content

The retrieved password not working for some other language than English


Recommended Posts

Hi all!

Since this forum has helped me a lot in resolving my problems I hope someone could help me on this problem that I have with a password retrieval.

When a customer forgets his/her password for my Prestashop store, he/she can retrieve a new one.

The sistem works fine, the customer gets an e-mail with a new password. But when he/she tries to use it, the new/retrieved password doesn't work. This problem, as just discovered, only appears when the customer is using some other language than English. When he/she registers as an English speaking user, the password recovery works fine.

But since my primary language is Slovenian and the customers in my Prestashop store www.unikatnica.com are mosty from Slovenia (si), they register as Slovenian customers and this happens to be a big problem. I noticed that the retrieved password which the Slovenian speaking customers get in their mailboxes, also contains special characters like š, č, ž, which we use in our language.

Do you think that this can be the reason why the retrieved password doesn't work?

Does anone know what to do to make retireved password work also in my language? Has anyone of you had the same experience and managed to resolved the problem?

I would be very thankful if anyone could help me.

Thank you and best regards,

Nina

Link to comment
Share on other sites

That is strange.
Password is generated in file password.php and mail is sent in this code

Mail::Send(intval($cookie->id_lang), .....



And actual password generation is in classes/ Tools.php

    static public function passwdGen($length = 8)
   {
       $str = 'abcdefghijkmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
       for ($i = 0, $passwd = ''; $i < $length; $i++)
           $passwd .= Tools::substr($str, mt_rand(0, Tools::strlen($str) - 1), 1);
       return $passwd;
   }



My first thought was that somewhere in process QWXY are translated to šđčćž but I am not sure if that is a case.
Tried that on one website but in mail I got QWXY so it is working for me.

So check files password.php, classes/ Tools.php and mails/si/password.html if there is anything suspicious.

Link to comment
Share on other sites

  • 4 months later...
×
×
  • Create New...