Created
January 23, 2014 14:15
-
-
Save christian-kolb/8579081 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('BYPASS_TOKEN_CHECK', true); | |
require('system/initialize.php'); | |
class Reset extends Frontend { | |
public function __construct() | |
{ | |
parent::__construct(); | |
$this->import('Database'); | |
$this->import('Input'); | |
} | |
public function run() { | |
$username = "yourUsername"; | |
$newPassword = "8e0107bf1c7fbeef6538dff7173aa458e7dd585e:8c37627a0e2c606189e7765"; // "reset123" | |
$this->Database->prepare(" | |
UPDATE tl_user | |
SET password = ? | |
WHERE username = ? | |
")->execute( | |
$newPassword, | |
$username | |
); | |
} | |
} | |
$reset = new Reset(); | |
$reset->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, I forked you at https://gist.github.com/bondt/8972660. :-)