Skip to content

Instantly share code, notes, and snippets.



Forked from christian-kolb/reset.php
Last active Aug 29, 2015
What would you like to do?
Place this file in your (Contao based) website's root folder and update your username in line 16. Then run it from the browser and log in to the backend using the password "random".
define('BYPASS_TOKEN_CHECK', true);
class Reset extends Frontend {
public function __construct() {
// 1. resets user's password to temporary to "random"
// 2. forces to change on login
// 3. if account was locked before, it's free now
public function run() {
$username = "YOUR_USERNAME"; // << set this to your username, obviously
$newPassword = sha1("random"); // thanks @aschempp for this addition
UPDATE tl_user
SET password = ?
, pwChange = 1
, locked = 0
WHERE username = ?
$reset = new Reset();
echo "Go ahead and re-set a new password!";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.