Jump to content

Mot de passe incorrect


Recommended Posts

Bonjour,

 

j'ai récemment installé PrestaShop 1.7 en local, tout marchais bien jusqu’à ce que j’éteigne ma machine.

Le lendemain petite surprise en voulant me reconnecter à l'espace administrateur, mot de passe incorrect.

 

J'ai donc voulu le changer dans phpMyAdmin, en concaténant la cookie key présente dans app/config/parameters.php et mon mot de passe, puis en cryptant le tout en MD5 via certains sites web. Cette manipulation n'a cependant pas marché.

 

J'ai bien essayé de faire "mot de passe oublié", mais Prestashop étant en local ça n'a évidemment pas fonctionné.

Comment faudrait il faire pour changer ce mot de passe ?

 

Merci d'avance pour vos réponses

Link to comment
Share on other sites

Bonjour,

Vous basculer en ligne.

Ou bien vous forcez l'accès en désactivant temporairement le contrôle du password.

Avec quelque chose comme ça dans votre AdminLoginController.php :

   public function processLogin()
    {
        /* Check fields validity */
        //$passwd = trim(Tools::getValue('passwd'));
        $email = trim(Tools::getValue('email'));
        if (empty($email)) {
            $this->errors[] = $this->trans('Email is empty.', array(), 'Admin.Notifications.Error');
        } elseif (!Validate::isEmail($email)) {
            $this->errors[] = $this->trans('Invalid email address.', array(), 'Admin.Notifications.Error');
        }
		/*
        if (empty($passwd)) {
            $this->errors[] = $this->trans('The password field is blank.', array(), 'Admin.Notifications.Error');
        } elseif (!Validate::isPasswd($passwd)) {
            $this->errors[] = $this->trans('Invalid password.', array(), 'Admin.Notifications.Error');
        }
		*/
        if (!count($this->errors)) {
            // Find employee
            $this->context->employee = new Employee();
            $is_employee_loaded = $this->context->employee->getByEmail($email); //, $passwd
            $employee_associated_shop = $this->context->employee->getAssociatedShops();
...
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...