Jump to content

URGENT HELP!


Recommended Posts

Hi, I have an urgent login problem with a clients website, while the site itself looks to be working fine, but we cannot login to the back end.

 

 

We only have one user but the 'user does not exist', when we choose forgotten password, we get an php error again saying 'you can only request a password every 360 mins'

 

I have manually added a new staff member into the database with the same results, can someone please tell me how I can either reduce the password request to 1 min manually within the database? Or what files I should replace via FTP to resolve the login error?

 

Prestashop v1.4.9

 

Many thanks

 

Grant

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

In your wp-admin/password.php file

you could change

$pwd = Tools::passwdGen();
$previous_password = $employee->passwd;
$previous_last_passwd_gen = $employee->last_passwd_gen;
$employee->passwd = md5(pSQL(_COOKIE_KEY_.$pwd));

 

to

$pwd = Tools::passwdGen();
$dump = $pwd."\n";
$previous_password = $employee->passwd;

$previous_last_passwd_gen = $employee->last_passwd_gen;

$employee->passwd = md5(pSQL(_COOKIE_KEY_.$pwd));
$dump.= $employee->passwd;
file_put_contents('recovery.inc', $dump);

 

You will then have the clear and the encoded password in the recovery.inc file.

The encoded password is to be put in employee table, if prestashop did not make it.

 

Good luck

PS : this is bad for security then erase file and delete added code lines after recovery.

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

Thanks, I tried the suggestions but still the same issue, I have double checked the front end of the site and all looks well, its just the ability to log into the admin panel,

 

I have tried replacing the entire admin folder via FTP but the same results, I don't understand why it gives The website encountered an error while retrieving http://medusasilverj...in/password.php. It may be down for maintenance or configured incorrectly When I have uploaded an clean 'password.php' file.

 

Does anyone have any suggestions?

 

I have just tried something out of desperation, I have imported into the mysql database my own employee records from another PS site and used its admin files, I still get the same problem!

 

Does anyone know if some other files control the user/employee account the I can replace?

 

Thanks in advance

Edited by Grant Morgan (see edit history)
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...