whatelse Posted May 31, 2015 Share Posted May 31, 2015 Hi there I try to solve my login problem on the admin site. Been careful no to forget about passwords. Still any password is not accepted anylonger. There are some code to use to have the password reset, tryed that too.... but no success have no password reset module installed and no email to the admin user set admin user I know I need to know what to do, not much knowledable about code but want to learn it. Anyone out there to tell me where to put this password reset code if I have to create an new page on the FTP server or add code to a existing page. kind regards - David Link to comment Share on other sites More sharing options...
LostKobrakai Posted May 31, 2015 Share Posted May 31, 2015 https://processwire-recipes.com/recipes/resetting-admin-password-via-api/ Link to comment Share on other sites More sharing options...
whatelse Posted May 31, 2015 Author Share Posted May 31, 2015 thanks lostkobrakai if my login name is wonder instead of admin, which entry I had to change on that script? since I tryed this script before but I just does not work for me. Tryed like this or any way but still login failed. require "index.php";$admin = wire('users')->get('wonder');$admin->setOutputFormatting(false);$admin->set('pass', 'yo12345ZZ');$admin->save('pass'); Link to comment Share on other sites More sharing options...
tpr Posted May 31, 2015 Share Posted May 31, 2015 Try saving the $admin: $admin = wire('users')->get('wonder'); $admin->setOutputFormatting(false); $admin->set('pass', 'yo12345ZZ'); $admin->save(); https://processwire.com/talk/topic/1736-forgot-backend-password-how-do-you-reset/?p=16163 Link to comment Share on other sites More sharing options...
LostKobrakai Posted May 31, 2015 Share Posted May 31, 2015 The above code is basically the same as the previous posted one, the first does only save specifically the password field and the other one all changed fields. As you've pointed that you're quite sure previous passwords should have worked, too, I'd think there's something else going wrong. Could you provide you're ProcessWire version and any installed 3rd party modules? Also could you please check for the existence of an userSaltHash in site/config.php, just to rule out issues with that. Please do not post the value, as this would potentially be a security risk for your site. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now