Jump to content

Can't reset password via API, get error... Sweaty palms


Recommended Posts

Posted

  

Hi

Client reset the password and forgot it, but if I try to reset the password via the api as

$users->get("name=admin")->setAndSave('pass', 'yoursupersecretpassword');

I get the error

Warning: Attempt to read property "id" on null in /var/www/html/wire/core/PagesEditor.php on line 346

Warning: Attempt to read property "parentTemplates" on null in /var/www/html/wire/core/PagesEditor.php on line 347

Warning: Attempt to read property "id" on null in /var/www/html/wire/core/PagesEditor.php on line 356

Oye… Fatal Error: Uncaught Error: Call to a member function numChildren() on null in wire/core/PagesEditor.php:366

I'm not sure how to proceed since I cant login and I cant reset the password. The install is fairly recent (less than 4 months old). I actually don't know how to see the exact version since I can't login to the backend.

Very much would appreciate some tips on how to get into this install. Thanks you

 

 

Posted

I see what happened. The client deleted the admin user somehow. I should make users with more restricted access I suppose ?

J

  • Like 1
Posted

@joe_g In that case the $user must have been a NullPage. I'll set it up to throw an Exception with a more clear error message when you try to save a NullPage. 

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
  • Recently Browsing   0 members

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