lemondropcreative Posted June 5, 2018 Share Posted June 5, 2018 Hello Can anyone help with the following please? We are new to Processwire having just inherited a site designed using the software. We have been given a login user name and password but it appears it is not for a super user account. With the limited access we have is there a way to either upgrade the account we do have or create a new super user? Any help much appreciated. David Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted June 5, 2018 Share Posted June 5, 2018 If you have access to the site files (via FTP or similar), you could reset the password with a script. Here's a recipe that you can modify accordingly: https://processwire-recipes.com/recipes/resetting-admin-password-via-api/ Link to comment Share on other sites More sharing options...
lemondropcreative Posted June 5, 2018 Author Share Posted June 5, 2018 Hello Jonathan Many thanks for the quick reply and advice. I tried the code and ran it on our url/reset.php However I still can not login in with user admin. We seem to have ProcessWire 2.2.3 We have no actually forgotten our password just don't have a super user account we can access. Does this code assume there is a default admin account and it is this password we are resetting? Sorry for lack of knowledge, this is new to us. Thanks David Link to comment Share on other sites More sharing options...
wbmnfktr Posted June 5, 2018 Share Posted June 5, 2018 Be careful with your site. ? Please create a backup of your website files and database first before trying anything else. No access is better than no site. Does your /reset.php work or do you see a 404 page not found page or errors at all? If it does work you could try this code to create a new SUPERUSER: <?php // if previously tried with this solution // https://processwire-recipes.com/recipes/resetting-admin-password-via-api/ // you need to include ProcessWire here as well - line below // require "index.php"; $newadmin = new User(); $newadmin->of(false); $newadmin->name = "newCmsAdminUser"; $newadmin->email = "user@domain.tld"; $newadmin->pass = "aSecurePasswordHere"; $newadmin->addRole("superuser"); $newadmin->save(); $newadmin->of(true); ?> I really don't know if this will work with ProcessWire 2.2.3 or if you need further adjustments. 1 1 Link to comment Share on other sites More sharing options...
lemondropcreative Posted June 6, 2018 Author Share Posted June 6, 2018 Hello Thank you both for your time and help with this. I have been able to get superuser access to the site. Thanks again. David 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted June 6, 2018 Share Posted June 6, 2018 Have fun with your newly granted access rights. ? 1 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