• 1 Post
  • 12 Comments
Joined 1 year ago
cake
Cake day: November 10th, 2023

help-circle
  • Create a file resetpw.php in endpoints/cronjobs/

    Paste the following code:

    prepare($sql);

    $hashedPassword = password_hash($password, PASSWORD_DEFAULT);

    $stmt->bindParam(':password', $hashedPassword, SQLITE3_TEXT);

    $result = $stmt->execute();

    if ($result) {

    echo "Password updated successfully.";

    } else {

    echo "Error updating password.";

    }

    Change mynewpassword to your desired password. If your environment is different, please set $webPath manually.

    Then run on your browser: domain:port/endpoints/cronjobs/resetpw.php

    Finally, delete the resetpw.php file so it can’t be unintentionally triggered again.I haven’t tested the code, but it should work.