Jump to content

Lost Admin (Superuser?)


OxfordSUOliver
 Share

Recommended Posts

Hi all,

I've just inherited a website from a colleague. The only information I've been given is an editor account, however I need to change a template for which I need to be a superuser.

Is there anyway to get the superuser information? (I think this has now been lost).

Thanks!

Link to comment
Share on other sites

Welcome to the forums @OxfordSUOliver

If you have access to your files, paste the following temporarily into one of your template files and then visit a page that uses that template:

$u = $users->get('sup'); // or whatever your supersuser name is
$u->of(false); 
$u->pass = 'your-new-strong-secret-password';
$u->save();

Remember to delete the above from your template file once done. If you don't know the name of the supersuser, you can check this in your DB tables. See the pages table. Scroll down to user with ID 41 and check the string under the column name. Alternatively, temporarily again, in a template file, do the following:

$u = $users->get(41);
echo $u->name;// this is the name you want for logging in

Note the original ProcessWire Superuser ID is normally 41, unless for some reason your colleague changed it, which would be highly unlikely, although they could have deleted that user having set up an alternative Superuser ?.

Edited by kongondo
  • Like 5
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...