Jump to content

[SOLVED] Do the reset password tricks work for you? They don't work for me.


Boost
 Share

Recommended Posts

Hei guys,

All the password resets in this forum don't work for me. I have the admin username with ID 41, but no luck. I noticed that all the examples for the password reset use username + password for the login. In my case, I use an email and password. Could that be the reason? Any ideas?

Link to comment
Share on other sites

hi,

no ? this one only resets the password (i think it's @bernhard who gave it)
first, put this in you _init.php file or on top of your _main.php

if($input->get->resetpassword == 1) {
  $admin = $users->get(41);
  $admin->setAndSave('pass', 'yournewpassword');
  die("admin url = {$pages->get(2)->httpUrl}, admin username = {$admin->name}");
}

then go to http://www.yoursite.com/?resetpassword=1
and, of course, immediatly remove this code from your template, goes without saying...

it only uses and targets the first admin user (id 41) whichever login you're using

have a nice day

Link to comment
Share on other sites

Hi @Boost

funny, i just had to use it for a friend yesterday and, once more (he often looses his password :)) it worked fine

the thing is, using this trick, first go to the domain url (not the admin login one) with the ?reset... as it works on the frontend of course and as you can see it doesn't use any user name or email to do the trick, only the user id
to check if it does something you may try having the "field_pass" table opened, refreshing it after you've gone to the homepage with the reset get var to see if it worked or at least did something

have a nice day

 

Link to comment
Share on other sites

30 minutes ago, virtualgadjo said:

to check if it does something you may try having the "field_pass" table opened, refreshing it after you've gone to the homepage with the reset get var to see if it worked or at least did something

Hi. How would you do that?

Link to comment
Share on other sites

You have to open the database + table (field_pass) in an SQL administration tool, e.g. PHPMyAdmin (Or if you have installed Tracy with Adminer, you can also use this)

Link to comment
Share on other sites

@Boost oh yes, being an old guy, i like to see if what i do actually does something, i don't totally rely on my brain ?

the important thing here is the homepage with the get var one as using the snippet in your _main ou _init only works on the front side

have a nice day

 

Link to comment
Share on other sites

maybe (really maybe...) your issue comes from the mysql port in your virtualbox but if the website works it shouldn't
i must say i'm a litte stuck here as using this trick quite often i never ran into that kind of problem be it online or locally

Link to comment
Share on other sites

  • Boost changed the title to [SOLVED] Do the reset password tricks work for you? They don't work for me.

Well, actually it might be even more fun to do this:

// site/ready.php
// REMOVE THIS AFTER PASSWORD RESET!!!
if ($input->get('logmein') == 'yesplease') {
  $wire->session->forceLogin($users->get("roles=superuser"));
}

Then visit any page of your website with ?logmein=yesplease and reset your password from within the PW backend ?

  • Like 1
  • Thanks 2
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...