Jump to content

[SOLVED] Admin login error after migration


Recommended Posts

Hi guys. I have migrate my prestashop 1.5.4 website from localhost to online. what i've done is :

- disable shop

- change the URL's (disable friendly url)

- backup my db

- upload files online

- import my db

- change the settings.inc.php

- verify the _shop-url table (all good)

- verify the _employee table (all good)

 

After all that i've tried to connect on my back-office and surprise : there is one error Invalid email adress.

 

Lol? Any suggestions? (yes, my _COOKIE_KEY_ and all other keys are the same)

Link to comment
Share on other sites

the solution for the problem is this :

 

The answer is to find the following function:

 

public static function isEmail($email)

{

return !empty($email) && preg_match(Tools::cleanNonUnicodeSupport('/^[a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z0-9]+$/ui'), $email);

}

 

and remove every occurrence of the following term: \p{L}

 

so it becomes:

 

public static function isEmail($email)

{

return !empty($email) && preg_match(Tools::cleanNonUnicodeSupport('/^[a-z0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z0-9]+[._a-z0-9-]*\.[a-z0-9]+$/ui'), $email);

}

Edited by shase66 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...